Web sockets and MQTT is not working at the same time

If I understand you correctly, perhaps a possible answer is that a websocket call is “a TCP send” call while an MQTT publish call in Mongoose-OS is a “queue this and send it” call, as this suggests.
Neither is realtime, though, as TCP is not.