So if your device is compromised, the attacker could trick you into entering 2FA for some minor action while it actually is transferring all your funds.
If your PC or smartphone is compromised nothing will prevent you from losing control of your accounts.
Yes, that is what I was trying to point out. With Yubikey or other 2FA devices you can not see the transaction details of what are you signing unless the device has a screen so a screenless device does not protect much more than this virtual yubikey.