I've tried reproducing your problem without success. I get the expected result (
java.awt.Rectangle[x=0,y=0,width=1920,height=1080]
and AffineTransform[[1.0, 0.0, 0.0], [0.0, 1.0, 0.0]]
) for both calls with Java 8, Java 17 and Java 22. Which JDK are you using? What's your setup? How are you compiling and running the program? You're probably overlooking some important information