This happens when you cast a spell when you are out of range so your character moves before casting the actual spell. The game only checks if the character is silenced when you choose the spell, so if your character moves into range of the Silence spell as a result of the casting, the spell still goes through.
A video of the bugI can think of 2 potential fixes for it:
The easier to implement solution would be just to recheck if the character can cast the spell after the movement, maybe have some text along the lines of
"Can't cast spells when silenced" above the character.
The better fix in my opinion (that's probably way harder to implement) would be to make the pathfinding of moving into range when casting the spells treat the aoe of the silence spell as a pit, forcing characters to go around it.