Can a GIoU loss (generalized intersection over union) be used after an STN module (spatial transformer network)?

I have a model that uses an STN module for number detection, and mean square error loss. But I would like to replace it for GIoU, because MSE doesnt take into account how much of the target area has been detected, only how close individual coordinates are close to the target. But I wonder if this makes sense. Has anyone tried it, or has some insight?