@Chris******
this does happen with visa exempt at that border, I had the same experience many years ago. What happens in this case is you are sent back from the Thai border to Malaysia, and Malaysian immigration cancels your exit stamp from Malaysia, so it's the same as if you never left Malaysia. You then spend one night in Malaysia, and next day Thailand will stamp you in (presumably now subject to the issues with restrictions on border runs).
This is as far as I am aware specific to visa exempt entries, it may not apply to reentry with a multi entry visa.
Historically, visa run companies paid tea money to immigration to facilitate same day return. This was supposedly stopped at one point, but it was well known enough it was covered in the Bangkok Post and other national newspapers.