Hi,
This depends on your tax residence status. You would need to determine if you are UK tax resdient and if so, you will need to declare the income -
guidance can be found here
RDR3 Statutory Residence Test
You can still contribute to your ISA/LISA in the year of departure but not after that until you return to the UK.
Thank you.