Not exactly true. You can use the listunspent RPC for addresses in legacy wallets or the scantxoutset RPC if you're comfortable with descriptors (it does not require creating any wallet file), and then add up the resulting "address" fields in the array.
This method also lets you get the balance of some or all the addresses as well, and in the case of descriptors, even an extended public key.
You can even get the confirmed balance by ignoring every item with confirmations field set to 0.
You're not wrong, but there are few serious limitation with RPC call you mentioned,
1. listunspent only works on address on your legacy address. It's not practical when you need to regularly add new address to wallet.dat since you need to perform re-scan.
2. scantxoutset is experimental feature.
3. AFAIK scantxoutset is very slow, unless you load whole UTXO to RAM or you use very fast storage to store chainstate folder.