Its a bad idea keeping a copy of your 2FA backup keys on cds or flash drives or any other digital format in a raw text, but if you do, you should always encrypt those with a strong password.
You should do to your 2FA backup key the same you do to your seed phrase or private keys.
Exactly since doing that could make you still at risk of hacking so best to store your back up keys out on your PC. Maybe use different device such as smart phones so that you can secure your accounts for any unwanted incidents. But we shouldn't rely only on 2fa security or backing it up since we also need to be careful on the links we are typing since there are phising sites or clicking any unknown links since there are malware that can penetrate to our accounts, just play simple without being curious on anything and for sure you are accounts is so safe.