Preventing pixel jitter without pixel grid snap (manual texture filtering)

Currently trying to prevent jittering pixels. To solve that, I use the method described [here][1] and [here][2].

It works quite nicely. But any rotation to sprites (even 90, 180 and 270) disables filtering. I know that it is somehow related to DDX/DDY nodes I use in my material function.

Because without using them it works as decribed [here][4] (that’s what bool in “alpha” is for). But that is imperfect: too big or too small and filtering will look bad. So I would really like to know why the first approach doesn’t work after rotation is applied: it is after all what pixel filtering is mainly used for.

Here is my material setup, pretty simple.

[Also a link to video demonstration of the issue.][6]
This is a real roadblock for me, so any help will be much appreciated.