Unable to use the same hot key on two different computers

The critical factor here is that you are doing this through Screen Sharing.

On my setup inserting text in the remote machine via a Keyboard Maestro Macro doesn't work reliably through Screen Sharing. I have just done a few tests. Sometimes it works and sometimes the text is garbled. Using "Insert Text by Typing" seems to work better than "Insert Text by Pasting", but even then mistakes get made.

As "Screen Sharing" is an App I suppose Keyboard Maestro is telling "Screen Sharing" to insert the text, rather than telling the remote App to insert the text directly. The fact that Keyboard Maestro is also running on both machines and is using the same hotkeys is probably confusing things more.