I found the same worked very well for me, around lunch hour is the best time for me to train.
I managed to go to the gym after work for a few years when I was on my early 20s, I had to force myself many times but I liked the routine and was motivated enough with keeping consistency but over the years I got more drained of energy from work and I couldn't muster the motivation anymore.
I experimented with going early in the morning on my way to the office for almost a year, I realised I absolutely dreaded it since it felt I had to rush to not be late even when there was ample time for my routines, instead of enjoying the meditative state of lifting weights I was always preoccupied with time.
In the end the best approach/routine for me was to start the workday some 30 min earlier, take an extended lunch hour to go train, and extend another 30 min at the end of the day. It always gives me the feeling of living 2 days in one, I feel clear minded and refreshed after coming back from my lunch hour, I don't have to care about waking up much earlier than my usual nor juggle between social activities in the evening and my training, I can do both: train, and go out after work to meet friends without caring that I missed a gym session.
Also the bonus of the gym being mostly empty at these times is also great, I get very unmotivated if it's packed, having to wait for equipment, anything that extends my routines takes the joy of doing them away.