I guess I have a different point of view here.
The sender should not manipulate the G-code file as it passes through the sender. The sender should send the file as is and report back any errors that Grbl sends it.
There are two G-code standards that grbl uses to determine how each G-code command should be handled. Grbl should control the interpretation of the G-code commands as specified.
In this particular case grbl does not support the M6 command, so it returns an invalid G-code error when the sender sends M6. The sender should report the error back to the user, not assume that the user just wants to throw it away.
I didn’t have two cents, so I gave one.