Issue with weapon's state property affecting skills

I have an issue with weapons - when I give a weapon property to give the target a state, it doesn't only for regular attacks but also for skills, unlike elemental properties that affect only physical attack.
Is there any script or code to make a weapon's state property work only for physical attacks?

Original thread: https://forums.rpgmakerweb.com/threads/issue-with-weapons-state-property-affecting-skills.138683/