This is a known issue with non-geometric objects (specially lights).
There is not a reliable way to get size of the light object (because is not geometry). Max returns different values, depending of the viewport state, gizmo, etc.
How to fix it: use Segment->Fixed Size to define the size. For example X=1m, Y=1m, Z=1m (all parameters must be non-zero).