Links to pages don't work now site is live

Do you mean the same permalink does not resolve on live but does locally?

Yes.

Could this be because the “live” site is on a test subdomain? www.test.example.co.uk

If so, is it possible to get the permalinks (using the page Uuid) to actually link to the page?

Or do I need this extra code to get it to work?
$page->text()->permalinksToUrls()