Without knowing the OPs exact circumstances it's difficult to comment in detail but certainly if you're "on payroll", and paying UK Tax and NI, then establishing your actual liability to UK tax and self filing
is indeed possible (there's even software to help out).
Some companies used to use some sort of a PAYE waiver for foreigners, but I've not heard of it receitly
Sounds like this:
section 690
Basically HMRC deduct income tax at a notional rate (usually calculated based on the previous year's tax return), and then after you've filed your annual tax return showing hours you've actually worked in/out UK they either refund any overtax you've paid or bill you for any shortfall...
I believe the ehic card is still being honoured though, so make sure you have one of those.
AFAIK it is, for now, and would be a useful stop gap but caution is needed - a EHIC is only meant to be used for short stays/holidays outside the UK( though I'm well aware of what sometimes happens in reality).
If an individual becomes a non-UK resident but is UK based, paying UK NI through a UK employer then as I understand it the correct way to get long term reciprocal coverage is to register a UK issued
Portable Healthcare Document S1 with the authorities in the country of
residence.