I just got back from doing this. I had a 3 hour layover in KL. Yet the immigration officer asked me what I was doing as I exited KL to get my return flight, and I was just honest with him (maybe I should not have been?) and said I was “coming in and going back out”. He told me “you cant do that”. He was kind enough to let me through which I quite honestly really appreciated. And he told me “next time stay one or two nights in KL if you do this”.