I was advised by Thai friends that part of the problem was using DMK airport as it's highly corrupted! They say use BKK if flying in or better still just cross at a land border, far less hassle and possibly no problem at all! 👍🏻
Apparently too many visits to Cambodia!? I was also told later that it was because I had no accommodation booked or proof of funding, both of which I had but the first guy didn't ask for evidence of..? All just a strange experience but nobody would overrule his decision. It leaves a sour taste with planning for long term stay in the future as I was planning for on my next visa
Happened to me last month from Hanoi to DMK.. You must fly back to the same departure airport with the same airline at your own expense.. best to then visit the local Thai embassy and ask for more details