I always advise folks to remove domain verification records as soon as the domain is successfully verified. Keeping them in your Public record makes it easier for threat actors to discover information about your environment and the tools, systems, and services you're using. This gives them a head start on figuring out what exploits you're most likely to be vulnerable to.
Any record used only for the initial domain verification has nothing to do with dangling DNS records or subdomain hijacks and doesn't have any impact on preventing them.
Dangling DNS refers to CNAME entries that point a subdomain to a 3rd party FQDN, and then you stop using that subdomain and discontinue the 3rd party service, but don't remove the CNAME record from your DNS zone records. Now it's "dangling" because it's in the public record but doesn't go anywhere.
Subdomain hijacking refers to someone else finding your dangling DNS CNAME, starting their own service with that 3rd party using the same FQDN you did, and now they can impersonate you on your own domain to phish or infect anyone that goes to that site.
None of that has anything to do with a text record that was used for 5 seconds to check and see if you really did have access to edit the DNS records of the domain you were trying to configure with any given service.