You're probably using the wrong Derivation Path to generate the addresses off your Electrum Master Public Key. Electrum DOES NOT use BIP44 derivation path of m/44'/0'/0'
Try using m/0 and see if that generates the correct addresses. You can experiment here:
https://iancoleman.io/bip39/ (You can download and run it "offline"... but it shouldn't matter with xpubs
- Set "BIP32 Root Key" (at the top) to be your xpub
- Click the "BIP32" tab
- Set "Client" to "Custom derivation path"
- Set "BIP32 Derivation Path" to m/0
You should get the same addresses generated at the bottom as you get from Electrum.