1x GRX chain sizing with 42T cassette
You need to adjust the derailleur B-screw. That adjusts the distance between the top jockey wheel and sprockets. Winding in the B-screw will move the jockey wheel away from the sprocket. The gap should be ~5mm.

See https://www.parktool.com/blog/repair-help/rear-derailleur-adjustment. The last section deals with B-screw adjustment.

You are correct that you should not change the chain length.