@Neil **********
you can fly to somewhere like Singapore or KL or Cambodia, get stamped in there, stamp out and immediately return to Thailand using the visa exempt entry (assuming you’re from a country that is granted that). Depending on the country you are flying to you may need a visa to enter there.