Hi, @Patr_UK
To resolve the issue of still connecting to your on-premises mailbox instead of your M365 mailbox after migration, you can try the following:
1.Update the DNS records to ensure that the records such as Autodiscover point to M365. More information can be found Outlook still connects to on-premise Exchange after migration - Server Fault
2.Create a new profile, Outlook may continue to reference old mailboxes due to settings such as caching. More information can be found Create an Outlook profile - Microsoft Support
3.Clear the Autodiscover cache and restart Outlook so that it performs Autodiscover again.
4.Make sure the user has the appropriate license. Or wait for a while after deletion and then re-add the license.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".