i don't know about copay but Electrum is one of the rare wallets that uses non-hardened paths which is why you can use the master public key to derive the child keys. if you want to find out more about how these things work then read BIP32:
https://github.com/bitcoin/bips/blob/master/bip-0032.mediawikithere is another option for wallets that use a hardened path which is deriving the child extended public key and then importing that but setting the derivation path after than to m/0, m/1, ...
for example if a wallet uses the path m/0'/44'/2' and each key comes from m/0'/44'/2'/0 and m/0'/44'/2'/1 and so on then the user can get the extended public key from the master private key at m/0'/44'/2' and then uses that to get the child public keys by extending them one level (meaning add the /0, /1,...).
obviously this wouldn't work if the keys are also hardened (m/0'/44'/2'/0', m/0'/44'/2'/1',...).
you can play around with the concept here:
https://iancoleman.io/bip39/ generate a random key and scroll down to "Derivation Path" and select BIP32 tab and set different derivation paths. you can copy the xpub in textbox above this part called "BIP32 Root Key" and see which one works and which ones don't.