You pay taxes based on residency, where you currently are doesnt matter as long as you're legal (ie, tourist visa or nomad visa)
Unless your job is willing to accommodate and open offices in all the countries that you're in (highly highly unlikely) then that's the only way
If you live in a high income tax country, it sucks, but it offers protection if SHTF