I struggled with a similar problem to yours, so I'll share my experience on how I was able to overcome it.
- More time spent in front of the computer DOES NOT EQUAL more work being achieved.
This is not technically "during the work day," but I think it's worth mentioning here. After getting home from work, I used to think "Ok, it's 6:00PM now, and I want to sleep around midnight. That gives me 6 hours to complete work on a personal project. I can do anything!"
This of course didn't work, because like you, I would be tired from the 8-hour work day. I started doing some sports to remove myself from programming for a few hours after work, and then when I got back home, I felt much more refreshed and energized when I sat in front of the computer. Sure, the amount of time spent was less, but I got more work done.
- When you're working during the day, be a conscious learner
It might be tempting to think that the programming you do during the day is separate from the stuff you do at home. But at work, you write code, you debug it, you break down real-world problems into smaller, more composable parts and build them into a larger more cohesive solution, among many other things. These are skills that prove to be very useful when you work on your personal projects.
Again, this is not technically "during the work day," and @Leon mentioned it in their answer, but it can't be stressed enough. When you come to the end of the day, don't try to squeeze in an extra hour or two of work, at the expense of your sleep. You'll be stuck in a viscious cycle of fatigue, and you will be tired at your job as well, not just when developing once you get home. Drop everything an hour or so before going to bed and read, cook, prepare for the next day, anything.
- Don't make "Crunch mode" a regular thing
Read this article
There are many points that could be added here, such as diet and exercise (yes, really!), distractions in your personal life and so on, but these are farther removed from "during the work day", so I'll leave those out for this question.