pyGMT gridlines going over lat, long labels

From what I understand one cannot just configure tick labels the way you want it.

You could however instead use custom tick/label mechanism of GMT. You’d need to create a custom annotation file per axis and separately indicate annotation labels with an offset and gridlines at the exact positions, like

...
# gridline at an exact position:
23.0 g
# annotation with a suitable offset
23.1 a 23°00'N
#  you'd have to manually format annotations with the degree char and the hemisphere char
# this may be another quest
...

Examples/docs:
forum link
GMT docs