Your accountant is wrong. Ask him/her to show you the IRS directive which says you can file as single if married. You could have filed as Married Filing Separately on paper or by following the IRS Publication 501 below. Some tax software will allow e_filing if you enter "NRA" in the area below the filing status box. However, this is an IRS issue rather than an immigration issue. You are neither the first nor the last to file incorrectly. You can amend your taxes later.
2024 Publication 501
"Select this filing status by checking the “Married filing separately” box on the Filing Sta tus line near the top of Form 1040 or 1040-SR. Enter your spouse's full name in the entry space at the bottom of the Filing Status section and enter your spouse's SSN or ITIN in the space for spouse's SSN on Form 1040 or 1040-SR. If your spouse doesn't have and isn't required to have an SSN or ITIN, enter “NRA” in the entry space below the filing status checkboxes. For electronic filing, enter the spouse's name or “NRA” if the spouse doesn't have an SSN or ITIN in the entry space below the filing status checkboxes. Use the Married filing separately column of the Tax Table, or Section C of the Tax Computation Worksheet, to figure your tax"