In general the police don’t say anything if you have been in the country over 3 months on an IDP, however insurance wise it’s best to be on it 3 months at a time, they like to find anything to avoid paying
Also make sure you get travel insurance, make sure it covers bikes, check the cc limit, quite often only up to 200cc engine
If you bring a international drivers permit, you can legally drive on it in Thailand for 3 months, if you cross the boarder or fly out and come back in it’s a new 3 month period on your IDP