I was noticing y-sorting errors when using the Tiled plugin (for example, coming up to a character from below, but their sprites overlapped instead of being underneath the player). Turns out there were cases where sprite.origX and sprite.origY could be undefined? oops.
Adding this line:
sprite.origX ||= 0; sprite.origY ||= 0;
In TiledTilemap.prototype._updateLayerPositions, just before updating sprite.x and sprite.y, fixes this problem.
You're welcome! <3