Had this issue recently at BKK. Had previously entered on a tourist visa then went home for a month and came back on 30 day exemption. (Had previously had B visa and WP and loads of COVID extensions l)
got pulled aside and asked a bunch of questions, showed them my onward ticket to China in 30 days and they were fine with it. Have avoided entering through BKK since then tho.