Signing messages with Wallet created with Ethers.js

Hi Zeppelins

I am trying to verify signatures with a wallet created with ethers with its method
ethers.Wallet.createRandom().

Then I create the hash of the message:
let sha256 = ethers.utils.hashMessage("message 1", "message 2")

And finally I sign it with:
const hash = await wallet.signMessage(sha256);

When checking the message I check that the method used is

function prefixed(bytes32 hash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    } 

Thus:

         bytes32 message = prefixed(keccak256(abi.encodePacked(idGame, this)));

I think this prefix is to check if it has been signed with a certain metamask?

Should I remove the check like this?

bytes32 message = keccak256(abi.encodePacked(idGame, this));

Or is it much better to add it in the message creation like this?

let sha256 = ethers.utils.hashMessage("\x19Ethereum Signed Message:\n32", "message 1", "message 2")

The thing gets a little complicated. I check that the hash returned is different if I do it from javascript than if I do it from solidity.

I make a hash of these two values: 1 and 0xDA0bab807633f07f013f94DDD0E6A4F96F8742B53 and they return different values depending on where I do it.

In javascript:
let messageHash = ethers.utils.hashMessage(1, contract);
result: 0x4d7df8449c9c3c240b091b1f6660a76593e77662edd1efa00e5d826609415208

with remix

        function getMessageHash(
         uint _idGame, address _contract
    )
        public pure returns (bytes32)
    {
        return keccak256(abi.encodePacked(_idGame, _contract));
    }

Result:
0x2effa95a3e815cf3bca1b4e91c301eaee9683075d938ceedac1024d75071f972

Why are they different?

Translated with www.DeepL.com/Translator (free version)