When receiving an error (e.g. "Evicted") from the backend, the client doesn't trigger it's onStatusChange callback because the room is cleaned up before the callback gets executed.
The key issue is in packages\loro-websocket\src\client\index.ts on line 719-721:
// Remove local room state so client does not auto-retry unless requested
this.cleanupRoom(msg.roomId, msg.crdt);
this.emitRoomStatus(roomId, RoomJoinStatus.Error);
Since the room is already cleaned up before emitting the status, the emitting fails and the onStatusChange callback is never invoked. These two lines should be switched.