[Non resident] Fidelity withheld taxes on total proceeds from stock/ETF sales

I'm a non-resident alien (NRA) with a brokerage account with Fidelity. Recently I did some stock and ETF sales (in March 2023) and to my surprise got taxes withheld at the max rate

Now, as an NRA, I'm not supposed to be taxed on capital gains/stock sales at all, as per the following section from this IRS article, unless I've resided in the US for 183 days.

I'm finding it hard to explain my situation to Fidelity or understand their dumb move.

 

"Capital Gains

With certain exceptions, capital gains income is not usually taxable to a nonresident whose days of presence in the United States do not equal or exceed 183 days in a calendar year. However, refer to The Taxation of Capital Gains Of Nonresident Alien Students, Scholars and Employees of Foreign Gover... for an exception to the general rule. If the capital gains income is taxable it is not usually subject to withholding. If the capital gains income is taxable, the beneficial owner of the capital gains income is required to report the gains on Form 1040-NR, U.S. Nonresident Alien Income Tax Return. The beneficial owner of the income may claim the benefit of the tax treaty article which deals with "Income from Gains" on his Form 1040-NR. (See IRS Publication 515 and Publication 901)."

 

What is my recourse to recover the taxes?

Please advise.