I'm assuming that you have a reason to use Nearest Neighbour. Maybe you are producing pixel art for your project?
So my idea was to rotate the rectangle with Bicubic Automatic which will use anti aliasing to soften the edge, and then use levels or Threshold to remove the aa and see if that produces a less ugly edge. However, things got a bit weired on me.
AFAICT your rectangle is 60 pixels long and full white. Rotating the white rectangle -45° looks like this. I have turned off the pixel grid, and the zoom ration is 1200%. There is obvious aa so I should be able to harden up the edge.
The same thing against a black background shows the aa as looking darker, so I'm guessing those pixels are still at, or close to, 255,255,255 but with reduced opacity. This gave me a problem.
Threshold set all the way up to 255 had no effect on the white rectangle, because the aa pixels must already have been at 255,255,255 but with the afore mentioned reduced opacity. Bummer!
Giving a Levels adjustment layer the entire canvas to work on did kill the aa
But if you clipped it to the white rectangle, you are back where you started from
So no help to you, but I enjoyed tracking down what was initially a bit of a mystery to me. I wonder if we can be of more help if you tell us why you needed to Nearest Neighbour? Is it some sort of pixel art? We do still get questions about pixel art so it must still be a thing.
Interesting, yeah its for a largescale pixel art project. The pixel art I am creating must fit into a specific color pallete for it to work in the way I want it to. This is one of the reasons I don't want to use other antialiasing methods (along with thinking nearest neighbor looks better while working with pixel art in general)