Sorry, I started to try to write down how to do it but it is pretty complicated. If you are not familiar with GDL programming then I would not try to tamper with modifying a macro in the default ArchiCAD Library if I were you.
You should probably hire someone to do it for you.
Basically, in the 2D Script of the gs_DW_Marker.gsm macro file you would have to modify the way the posY value is calculated to bring the text close to the axis.
There are four lines where it is set, lines 855 and 857, and lines 875 and 877.
In both cases you would have to give a smaller value instead of -1.5 (like -1.2 or -1), or you would have to set a higher value instead of the 2 (like 3 or 4).
Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac28