How to enable pixel perfect transformation in Godot

Godot Version

4.7

Question

I want my 2D game to have pixel perfect rotation like this (image is taken from a forum in Defold engine about the same subject by the user p9alisand)

rotate_pixel_perfect

Is there a global setting that allows this? if so, can it be toggled on or off
if not what are the workarounds?