I would not change the autodiscover entry until ALL the on-prem mailboxes ( and any public folders) are migrated to 365.
If you do, you risk breaking the existing on-prem mailboxes accessing Exchange remotely.
There is no risk in not changing the record for 365 mailboxes. Modern Outook clients use direct connect to Exchange Online anyway:
https://learn.microsoft.com/en-us/outlook/troubleshoot/profiles-and-accounts/unexpected-autodiscover-behavior
Older clients will still use the on-prem SCP if necessary and then get redirected to 365