Thank you for this. Regarding this point "you will need to ensure the company doesn’t become resident under the domestic law of your new country of residence", how do I ensure this? The EU country is Portugal.
I'm planing to leave the UK to become resident in a EU country, but I want to keep my UK limited company open as I'm expecting to continue contracting through it (mostly remotely). If I'm resident outside of the UK, but my company is registered in the UK, where do I pay my company taxes? And how do I keep paying myself salaries and dividends? And how and where are these taxed?