Right. It also adds up quite a lot of space. Since you asked yesterday, I did an experiment and this is the smallest I could make it, for a 40v, 40A board, best you could do is 3x3cm. If you do very high voltage, the protection circuit gets as big as the control board itself, because you need to use high-voltage components. If you are restricted for space you need to solve this problem outside the control board. You can always add protection as a separate board to your solution.
That’s my current plan, on the main PCB just the DC and when I want to use ac, i use an extra board with rectifier and capacitors. I’m trying for 55x100mm maximum size (so you could fit it on the side of a nema 23 bldc). Also I’m trying to fit a full size esp32 node MCU that takes like a quarter of the space. Opto isolators for the inputs. 15v to 5v step down converter and main DC bus caps.
I just ordered my parts now, because i got it to work with just the IGBTs and 3 caps on the bootstrap circuit. So i assume the proper one also going to work.