If it is to be hand tightened, you can make the head in a T shape which is perfect for horizontal printing.
If the application only requires low torque to push a spring, you will be fine printing vertical. When too much torque is applied to these vertical bolts, they break just underneath the head.
In all fairness, that’s a very simple fix. You can other use a negative rectangle shape or you could use a cube and then boolean union in the slicer or simply cut it in CAD.