Multiple undo steps does not undo flagging

2.1.46+ once I add a flag to a card I am not able to undo past that action - is there any way this can be fixed?

I presume you mean you can’t undo reviews. To do that, you need to enable the v3 scheduler. The 2021 scheduler - Frequently Asked Questions