If you realized a capital gain on your brokerage account - it would be taxable as long or short term capital gain depending how long did you hold shares in your account.
As long as the capital gain realized - you may not defer it or avoid - I am not surprised that your CPA did not provide any suggestions...
To defer capital gains - they should be realized in tax deferred account - for instance - you may open IRA brokerage account - and same transactions resulted capital gains will not be taxable unless you will take a distribution.
The disadvantage is that the distribution will be taxable at your regular tax rate regardless if it was short or long term gain.
You may have Roth IRA brokerage account - in this case any gain will not be taxable if you follow Roth IRA rules.
If you want to combine your brokerage account with estate planning - you may have the account in Charitable Remainder Trusts - in this case the distribution will be taxable, but the rest of the gain will not be taxable assuming it will go to the charity of your choice after you die. That would be very complex estate planing and should be discussed with your financial adviser.
Let me know if you have any concerns or thoughts this matter.