ok, then there's no easy way.
wonder if the devs or people who work on this never think about certain scenarios.
Problem is that's kind of unique to Bitcoin Core (
at least "was").
Its legacy wallet uses a BIP32 derivation path that uses all hardened derivation from extended key-> account_index ->chain_index -> address_index.
Wallets such as Electrum don't follow that standard.
But in new wallets created in newer versions of Bitcoin Core, you see that it's possible to restore it Electrum in the way I've provided.
Plus Bitcoin Core already stopped generating legacy wallet.dat so implementing such feature could be a waste of effort.
But it's certainly possible if Electrum's future version that supports descriptor can take full derivation path and hardened addresses.