It is quite comical that one doesn't even need to have the shield equipped in hand to gain its +2 AC boost.
I mentioned this in a recent bug report to Larian, and their support team told me this is a known issue intended to be fixed for full release.
Of course, if they don’t change free swapping between melee and ranged weapon sets too (which I hope they will), then people will still be able to get the AC boost by swapping back at the end of their turn. But at least we’ll be able to avoid the effect if we want to.