Another way is to solve this with content only. Instead of relying on the
abbr tag, you can simply always spell the acronym out the first time you use it on every page.
For example (adjusted from the Wikipedia article on the World Wide Web):
The World Wide Web (WWW) is an information system where documents and other web resources are identified by Uniform Resource Locators (URLs, such as https://example.com/).
English scientist Sir Timothy Berners-Lee invented the WWW in 1989.
That's generally the more user-friendly approach as it is visible and clear to everyone.
Even with the solution you posted above,
abbrs are still not accessible to all screen readers or to people who don't understand the functionality that they can hover or click on it to see more.