Yep, gnomes going hostile in this fight is a known issue with patch 9, or at least I think some folk saw problems in earlier patches but I only noticed it this one. And I’ve definitely seen it mentioned more than once on these forums too, eg
https://forums.larian.com/ubbthreads.php?ubb=showflat&Number=843691#Post843691.I’m not sure exactly what triggers the hostility, but there’s clearly something bugged. Personally, I’ve just completed this encounter without using AoE spells in my two patch 9 playthroughs but depending on what other choices you make that could make the battle very challenging. Other forum members may have played around more and be able to give advice about workarounds that doesn’t hamstring your party quite so much.