Enemy Rows that disable targeting / Untargetable state

Hello!

I need a plugin that allows for two rows of enemies front and back. Enemies in the back row can't be selected as long as there are enemies in the front row -- except by actions that target all enemies.
I don't need actor rows.

In short, I need to create an untargetable state for enemies that is auto-removed if every alive enemy is being affected by it.

Does this thing exist yet?
I know about YEP Row Formations and related Target and Selection plugins, but I don't think you can achieve this effect with them.
You might want to go back to those plugins and read through the help files some more, because those plugins allow you to do exactly that.
Do you mind being a bit more specific? I read through them again and I can't seem to find how to achieve what I want.
Specially when it comes to handling auto-removing targetting restrictions when the front row is dead.
I also found this script that sorta does what I want (and in a single script instead of 3!) but it has the same problem.

Original thread: https://forums.rpgmakerweb.com/threads/enemy-rows-that-disable-targeting-untargetable-state.112032/