I was originally as confused as you, below the line you can see my original reply I've left it in for reference.
After some playing around I found out that any stat that appears on the hero or class is lowered when un-equipping, but stats that don't appear there are not lowered, look:
My class adventurer has Ph.Atk hard-coded to stay 0:

My Warrior does not have them set, so they effectively start at 0 but there's a caveat I'll get to in a bit:

Now, when Adventurers un-equip their sword their stats get set back to 0 quite nicely:

Warriors on the other hand do not get it lowered back, because they don't actually have a base value set!

So if there is a stat that needs to stay 0 without equipment, hard-code them to 0 in the editor!
I second this, I've run into this as well recently; some equipment's effects are not removed on un-equip but they are applied again and stacked on re-equip. In my project it only seems to affect stats that would otherwise drop to 0 on un-equip:

1. Un-equipping this sword does not lower any stats (I expected it would lower Ph.Atk by -2)

2. Re-equipping the sword does raise Ph.Atk by 2... Again. (I expected it would be 0 without sword, 2 with sword; but instead it got raised by 2 permanently on each equip)
I can repeat these steps infinitely for infinite Ph.Atk; it never lowers on un-equip!

3. Replacing one weapon with another always works fine for some reason (the dagger gives +1 Ph.Atk & +1 Prc while the Sword gives +2 Ph.Atk only; this is completely according to expectations!)

4. Even if I do this the other way around it works fine! I can repeat these two steps infinitely, it will never behave out of line!
Are you ready for this to get real spicy? Read on:

5. Un-equipping the dagger does lower Prc by 1, that's good! It does not lower Ph.Atk by 1, that's a bug! It seems this only works as expected on stats that would not be 0 without equipment?

6. Re-equipping the dagger does raise both Ph.Atk and Prc each by 1, meaning that Prc works as expected but Ph.Atk gets raised into infinity! (it should lower both stats by 1 on un-equip in the first place, even Ph.Atk)