You bought at 999 and received 1k. That is $1. You lost me. No one had a loss. Both made money. One in capital gains and the other it was interest.
I see what
@aygart is saying. If you buy at 950 and sell at 999 and that is considered a CG, not interest, apparently there's something that causes the interest only to be recognized at the end. If that is the case, one would assume the buyer (holder at maturity) would get the full interest on a 1099-INT (since we've established that the brokerage doesn't pro rate the interest) and have a capital loss of $49 since the cost basis was 999 and the proceeds 950 (as 50 is already being attributed to interest).
Also, is the same true for treasury notes? If so, it creates an interesting opportunity to sell before maturity and pay the lower long term CG tax rate instead of ordinary on interest income.
Another interesting scenario I can think of is if someone has unused capital losses they'd want to sell treasuries before maturity so that it becomes CG instead of interest.