How to prevent troop from being drawn in front of party members ever?

Hi, I'm utilizing a fake front view system utilizing the sv system more or less like this (first image) but whenever it's the enemies turn - the whole troop is rendered at a z layer position higher than the party members (second image), I can't for the life of me figure out why - I am using yanfly's battle manager and have tried several battle systems within it to see if it was another plugin overwriting something from it but that does not seem to be the case. Yanfly's battle manager does have a 'sprite priority' parameter that I would think affects this but apparently this is caused by something perhaps more fundamental to the engine that I'm not aware of. The visual selection works fine with whitening the sprite while targeting it during ally actions, and I've looked around a lot of the startaction functions with regards to whitening the sprite and setting action state but this is effecting the whole troop not just the individual who is taking an action (using olivia OTB - regrettably obfuscated, could be culprit, but I tried using STB which has similar functions and was still causing the issue - so I'm leaning toward it being higher level)

1731443615254.png
1731443852992.png
how did you create or place the picture of the party members?

and if yanfly plugins behave strangely, then you should always check the order of them in your plugin manager first - they are known for strange effects and errors when in the wrong order.
it's just normal side view but with the coordinates changed, allies are sv_battlers enemies are just regular sprites. I've combed through a bunch of functions and overrides of turn start action start etc to see if I could find a culprit but not yet. Already checked load order - for all battle related plugins except olivia's which is obfuscated, but i did disable it and the effect still happened.
Are you using yanfly's Battle engine core? If so, have you tried changing this setting?
1731449957790.png
I mentioned this in my original post, I have tried it - does nothing.
then some other plugin is probably interfering, can you give us screenshots of your plugin manager so that we can see the entire list?
don't judge me lol (years long project) and if it is the case that something is interfering I should be able to just overwrite it with another snippet right? but I looked through my whole solution in vscode and nothing overwrites yanflys battlefielddepthcompare (the function that deals with sprite priority).
Already checked load order
but the order is still wrong in several cases
the order for yanfly's plugins has to be the order they are in his main list on his website, top to bottom.
you can add other plugins between them, but cannot change that order.

and at least two plugins are in the wrong position without even a direct comparison - the damage core is between the battle core and the action sequence extensiont, that is wrong. and the message extension is also wrong, and probably many more
found the culprit, turns out olivia's octobattle overwrites sprite priority even if otb isnt used as the battle system, and because the code is obfuscated (even though the terms of service say you can edit the code when you buy it!) I'll need to find a workaround there, thanks for the help.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-prevent-troop-from-being-drawn-in-front-of-party-members-ever.173189/