Did one a few months ago at the same border crossing. Immigration will charge you 2000 baht to exit and return the same day. They can refuse entry to anyone at anytime for any reason. That’s why it’s 2000 and not free like it should be. It’s either pay up or stay for a few days in Malaysia.
Thailand is cheaper. Accommodation costs less, food costs less and both are better quality. I think alcohol costs more in thailand but that doesn’t affect me.