Retirement tax questions

I guess my question is as follows:

Lets say I contributed $19000 to my ROTH 401(K) in 2019. My company's plan needed to return back $3000 of that to me in order to conform the plan. There was a capital loss of $300 when they gave me my money back, so they gave me back only $2700 instead of $3000. Now the 1099-R has $2700 and I have entered it as you suggest. 

So basically I was only allowed to contribute $16000 instead of the usual $19000, but only got back $2700. I was also taxed on that $3000 last year, since they are ROTH contributions.

What about the fact that I netted a loss of $300 on my investment? How do I get a credit for that OR do I not get it at all?