Is it even a foul

If there was no VAR then the ref may be vindicated.

The sending off is just plain wrong.