In my view it is not worth the risk with less than six months in your passport.
A couple of years ago I had entered Thailand on a METV, extended it at Immigration, and then came the time for a ''border bounce'' to Laos.
At the immigration check point coming back into Thailand I was directed into the office and told I could not re-enter because I had less than six months on my passport.
There was then a protracted discussion during which I pointed out that my Thailand visa was still valid and was issued regardless of the fact that its validity exceeded my intended length of stay in Thailand, as did my passport, which went beyond the validity of the visa in any event, and I produced my outward flight details. The senior immigration officer was unmoved.
I continued to ''argue my case'' that both my visa and my passport covered my length of stay and that I had a visa that was valid for six months in any event and it was only Thailand rules that required me to ''leave the country'' after 90 days to ''reactivate'' exactly the same visa that I entered with in the first instance.
Eventually the Immigration officer relented and stamped me back in . (I did not pay any fine and nor was it suggested).
I was lucky that day and learned my lesson to ensure that my passport has a year to run before the start of any planned visits !