I had the same problem last week. I was on an Ed for my master degree, finished it, and was on the covid exemption until the 25th. Went to extend for 2 months because I just married a Thai, and I'm waiting on the 2 month wallet wait, and was denied an extension. Then told them I was also receiving medical treatment, which I am, and was also told no, I have to leave. They wouldn't even give me a 7 day extension so I wouldn't go into overstay. So I had to hurry and do the Thailand test and go program and I'm flying to Cambodia on Monday.
So thanks to immigration and their stubbornness, it's costing me about 20k to get a temp visa before I apply for my marriage visa.