I did already reported this bug some time ago, but now I noticed that it happens specifically whenever two weapons of the same type are dual wielded (two pistols, two swords, two blunderbusses, etc.) and the character is proficient in both the types of weapon slotted.
The modal ability of said weapon stays active in the character panel after switching set or unequipping weapon.
It doesn't seem related to objects that grant another weapons set as I thought initially.
https://www.dropbox.com/s/g58vhxmitxx37ve/Dual%20Weapon%20Bug.zip?dl=0