I know, its worrying how old this bug is, and no mention of fixing it in the hotfixes. I'm hoping it will be sorted in the next big patch, but who knows when that will be.
The fight that it first started on for me was when I first met the Hyenas giving birth to the Gnolls. There was a slight bug when talking to the Hyenas as the birth cutscene played twice (no idea if this would or why this might have anything to do with the AI bug), and then the fight started. One of the Hyenas ran up a hill to some Gnolls to pull them into battle, and after they joined the battle and walked slightly down the hill the bug started properly. From that moment no one outside my my party would move, use an action, or attack at all. When later encountering a fight between some friendly NPCs and some Gnolls I found that the friendly NPCs had the same problem of not being able to do anything.
Thank you for saying about Shadowheart though as I have her in my party, so maybe removing her might be a short term fix for me as well!
I reported the bug to Larian via the Larian website (though haven't heard anything back as they said they are experiencing a high volume of tickets currently). Here's a link to the bug report page if you want to send over one!
https://larian.com/support/faqs/how-to-submit-a-bug-report_85