I didn't exactly what you did but you can easily have a seed phrase generating same p2wpkh-p2sh addresses in Electrum and iancoleman without any need to change the source code. (Maybe I am missing something?)
Go to iancoleman. At bottom of derivation path, select BIP49.

.
Generate a seed. iancoleman will give you some p2wpkh-p2sh addresses.
Then go to Electrum. Create a new wallet. Select "Standard Wallet" and then "I already have a seed". Enter the seed phrase generated by iancoleman. Don't forget to click on "options" and check "BIP39".
Click on "next" and select "p2wpkh-p2sh" as the "script type". Electrum will give you same addresses.