I can't progress because I keep getting the same error
I have good news and some bad news.
the good news is that I figured how to avoid the bug and kill the bastard. The bad news is that after he dies the game bugs out anyway.
step 1: If you line up the yellow plant guy and the brown plant guy below him like this he will always use his first attack to them without giving an error.
Step 2: hope that he does not run too far after he has attacked..
Step 3: surround him completely with the yellow plant that got damaged in front of him. When I placed the other plant guys infront of him it did not work. I have a hunch that he prioritises attacking a damaged plant guy over something else and as long as he does not have to turn around to do it he will just say his line and not attack. I did not test all possibilities, but if you do it this way it seems to work 100% of the time.
Step 4: just damage him down to 0 as slowly as you want.
Step 5: watch him die and cry because the game does not give you a victory screen or anything, you are just allowed to take a few more turns as if the boss was still alive before the game finally bugs out completely.
It might be that if you don't surround him and just make sure that a damaged yellow plant guy is infront of him at all times, that he then will attack normally without bugging out and that the game then will let you progress for some reason. But I can't be bothered to try.