Where do you call
Spriteset_Battle.prototype.battleFieldDepthCompare
because it's not a default RMMV parameter, and that might be causing the error. My plugin overwrites
Spriteset_Battle.prototype.adjustSprite Spriteset_Battle.prototype.updateZCoordinates
Now that I think about it, if that plugin overwrites updateZCoordinates, it would be wiped clean by my plugin, so try including that plugin after EarthboundBackgrounds and see what happens.
Basically: Flip the order of the 2 plugins and see if that fixes things.