Right now to recover from a backup with an encrypted HD wallet the user must do something like unlock the wallet with a really long time out and manually trigger a rescan,  otherwise they risk missing some keys when auto-topup cannot run.
if (m_default_address_type == OutputTypeLEGACY) {
        return OutputTypeLEGACY;
    }
    bool any_tr{false};
    bool any_wpkh{false};
    bool any_sh{false};
    bool any_pkh{false};
    for (const auto& recipient  vecSend) {
        stdvector<stdvector<uint8_t>> dummy;
        const TxoutType type{Solver(recipient.scriptPubKey, dummy)};
        if (type == TxoutTypeWITNESS_V1_TAPROOT) {
            any_tr = true;
        } else if (type == TxoutTypeWITNESS_V0_KEYHASH) {
            any_wpkh = true;
        } else if (type == TxoutTypeSCRIPTHASH) {
            any_sh = true;
        } else if (type == TxoutTypePUBKEYHASH) {
            any_pkh = true;
        }
    }
    const bool has_bech32m_spkman(GetScriptPubKeyMan(OutputTypeBECH32M, /*internal
    if (has_bech32m_spkman && any_tr) {
        // Currently tr is the only type supported by the BECH32M spkman
        return OutputTypeBECH32M;
    }
    const bool has_bech32_spkman(GetScriptPubKeyMan(OutputTypeBECH32, /*internal
    if (has_bech32_spkman && any_wpkh) {
        // Currently wpkh is the only type supported by the BECH32 spkman
        return OutputTypeBECH32;
    }