Why do I have to report my gain to the IRS, when I didn't withdraw from my account?
Only when you sell and actually get the money.
It is either a gain or loss the moment it is sold. It doesn't matter if it's immediately reinvested in something else.