Question about tsfa over contribution and gains

If your tsfa is maxed out and you over contribute an additional $50,000 to invest you will be fined 1% per month for each dollar over contributed. For $50k you will be fined $500 per month (1%)

Lets say the investment you put the $50k into makes 5% in that same month, are you obligated or fined on the 5% gains as well, or just the original 1% on the over contributions? Will the 4% investment gain be tax free?

Just a side note: Not actually gonna do this, just curious as to what would happen.