This is a typical problem for many years (since the introduction/increase to Baht 700 and inclusion in ticket (instead of local cash payment for everybody!)
for example DPS-BKK-MUC: you have to leave the airside transit area for your hotel room, but the CRS - upon automatic calculation of the applicable taxes) think that you will stay and "only transfer" (within 24 hrs)...Thai must then pay 700 Baht to Airport of Thailand (AOT)...
Only if you "force" your travel agent before ticketing to make sure (for example by forcing a stopover at BKK om your ticket itinerary) you can make sure that these taxes will be collected upon ticketing already.