I remember Dumbledore asked Snape if he would promise to keep the students safe and yet he was allowing the Cruciatus Curse to be used as punishment.
I don’t think Snape had much choice, and the students WERE safe, just like Harry was “safe” with the Dursleys.
Dumbledore didn’t stop Umbridge using her horrible quill, and he HAD to have known about it at some point.