I've read a lot of advice against storing your 2FA codes in your password manager and I don't understand why. Isn't a file on your computer something you have?
There is the added benefit that you don't have to worry about losing your phone or yubikey so long as you keep multiple backups of your encrypted password database.