Ethereum Foundation researchers are examining native transaction assertions that would check changes to balances, storage or code after a transaction runs and revert it if a required rule fails. The work is still at the research and proposal stage, not a safety guarantee for ordinary Ethereum transactions.
EIP-7906 is one possible route, but the foundation says it is under consideration and has not been confirmed for a future upgrade. Wallets or protocols would still need to enforce the rules, and a rule supplied through a compromised interface could still allow a harmful outcome.