MV Disabling attack command

I'm trying to disable (not remove) the attack battle command when the player is under a certain state. Works fine for sealing "guard", but not for attack.

I notice even if I go into rpg_windows.js and change
this.addCommand(TextManager.attack, 'attack', this._actor.canAttack());
to
this.addCommand(TextManager.attack, 'attack', false);
it's still enabled. The code is definitely being run, too, because if I just comment it out the attack command does disappear.

Is there something really obvious I'm missing here?

I tried HimeWorks' battle command plugin and that let me seal the command, but it wrecked havoc on the ring menu plugin I'm using.

EDIT: I was finally able to get it to work by adding
this._list[0].enabled = !this._actor.isSkillSealed(1);
to the end of Window_ActorCommand.prototype.makeCommandList. But it's a REALLY messy duct-tape solution. Surely there's something a bit...smarter.
go to Traits > Skill > Seal Skill > Attack
go to Traits > Skill > Seal Skill > Attack
I'd already done that, hence the check for "this._actor.isSkillSealed(1)", but the command was still showing as enabled. Even if I bypassed that check entirely and setup the command with the enabled argument as "false" it still showed as enabled.
As Example:
The SRPG system has its own ActorBattleComands and i added GameSwitches to each of them..
ill show how i did that with Imgs and i will show where you can do the same for the "normal" default rpg system^^

here what i did in SRPG :
Spoiler: imgs srpg edit example
Screenshot_4.png

-
Screenshot_3.png

-
Screenshot_2.png

-
here is where you can do the same in the default system:
Spoiler: rpg default (rpg windows plugin )
Screenshot_1.png
If you need more detailed Infos pls let me know i can explain it step by step if needed^^.
I hope that helps.
Edit
If you are not familiar with JS i could edit a RPG Windows Plugin and send it to you..
(i asume that this is allowed but im not sure,..)
=> that edited RPG Windows Plugin will have Switches in its Parameters where you will have to insert the GameSwitches IDs..
Edit2
Sry i forgot that you dont want to remove the Command , this solution will Add or Remove the Command depending on the GameSwitch.Also this solution will Add or Remove the Command for all Actors .
( I dont know how to Disable but still show the Attack Command sry)

Original thread: https://forums.rpgmakerweb.com/threads/disabling-attack-command.128553/