Poor anti-aliasing for small tilted rects in online experiments

OS (e.g. Win10): Win11
PsychoPy version (e.g. 2024.2.4 Py 3.8): 2025.2.3
Standard Standalone Installation? (y/n) If not then what?: y
Do you want it to also run locally? n
What are you trying to achieve?: Render smooth rectangles that can tilt at any degree of angles.

Link to the most relevant existing thread you have found: Drawing multiple anti-aliased lines - Coding - PsychoPy

What specifically went wrong when you tried that?:

I was trying to create a staircase study that changes the orientation of a rectangle adaptively for an online experiment. However, the quality of generated rects are very bad (as the attached imgs show, the yellow brush is drawn by me for highlighting, not from the study).

For reference, this is how I generate rectangles:

target = new visual.Rect({
win: psychoJS.window,
pos: [0, 0],
lineWidth:0,
fillColor: elementColor,
width:Display_Element_Width,

ori: level,
height: elementHeight
});

‘level’ is the variable from staircase that can be any value from 0 to 90.