After conducting further research, I was able to resolve the issue independently. The solution involved converting the string into an ASCII array before sending it through the WebSocket.
const enc = new TextEncoder().encode(data);
proxySocket.send(enc);