Tested on Mac, Blender 4.5.4 and 5.1 RC. Seems the positions needs to be multiplied by bpy.context.preferences.system.ui_scale

Also, if the image texture node is in a frame, the dimensions label is not positioned.
This fixes both here at line 165-ish:
abs_x, abs_y = node.location.x, node.location.y
parent = node.parent
ui_scale = bpy.context.preferences.system.ui_scale
while parent:
abs_x += parent.location.x
abs_y += parent.location.y
parent = parent.parent
vx = (abs_x + offset_x) * ui_scale
vy = (abs_y + offset_y) * ui_scale
rx, ry = view2d.view_to_region(vx, vy, clip=False)
Tested on Mac, Blender 4.5.4 and 5.1 RC. Seems the positions needs to be multiplied by bpy.context.preferences.system.ui_scale
Also, if the image texture node is in a frame, the dimensions label is not positioned.
This fixes both here at line 165-ish: