If you've got persistent malware on the machine (-> keylogger), 2FA with a hardware key will barely help. The malware can just notice your "sudo" call, pass through your password + 2FA token to its own "sudo" invocation, and make your "sudo" invocation say "invalid password" -- which you'll likely interpret as a typo.
Not that getting root is too interesting for malware running on your personal machines that runs all the interesting code as uid1000. https://xkcd.com/1200/