Temporary Solution with help from chat gpt: (If you are not using transparent ui then you need to edit FlatUI__/graphics/gui-new.png instead, you might also not want the extra pixels to be transparent, but thats something you can ask the chat bot about)
Step-by-step in GIMP
Open the file
Start GIMP.
Go to File → Open and select gui-new_tr.png from your FlatUI/graphics/ folder.
Check the current size
In GIMP’s title bar or in Image → Canvas Size…, you should see the dimensions: 593 × 1222.
Increase the canvas width
Go to Image → Canvas Size…
In the Width box, change 593 to 595.
Leave Height at 1222.
Click the Center dropdown next to “Offset” and set it so the image stays anchored to the left. This makes the extra pixel appear on the right side.
Add the transparent pixel
In the Canvas Size dialog, make sure Resize layers: All layers is selected.
Press Resize.
Now the image is 595×1222, with a 2-pixel wide empty strip on the right.
Because your image already has transparency, that new column will automatically be transparent.
Export the file
Go to File → Export As…
Choose gui-new_tr.png and overwrite the original in:
FlatUI/graphics/gui-new_tr.png
In the export dialog, keep defaults and click Export.
Test in Factorio
Restart Factorio.
The error outside the actual sprite size (… right_bottom=594x877) should be gone.