So what's the solution? In the evenings I always feel like I have to
decide between losing part of my personal evening time, vs being seen
as a slacker
Unfortunately, there are no simple answers here. "Whenever your work is done" almost certainly means "Whenever you deem it appropriate", since most software developers don't measure their work on a daily basis.
I think this is all part of being a professional, salaried employee. You don't punch a time clock. You won't be told "come in at x o'clock, take exactly 1 hour lunch, and leave precisely at y o'clock". You have to figure it out on your own, based on your company's culture, your own career ambitions, your work needs, and your family needs.
I tell my team that I don't want them watching the clock.
Aside from "core hours" where we schedule our meetings, they are free to come in early or late, and free to leave early or late. I don't care how many hours per day they are sitting at their desks, I just care that the work gets done.
I don't want to babysit them, and I don't want to micromanage them. I treat them like experienced professionals, and I trust them to act like mature professionals and figure out on their own how many hours they need to be around to get their work done.
I've told them that if they can accomplish their work in less than 40 hours, they can feel free to leave as they see fit. But if they are behind, or we have critical deadlines/releases coming up, I expect them to work extra as needed.
In practice, everyone figures it out for themselves. They each adjust their schedule according to their commuting and family needs, according to how hard they want to work, according to the needs of the projects they are working on, and how much they want to get ahead.
Some work around 40 hours per week or a bit less. Others work more. Some have worked a lot more.
Some generally arrive very early, and cut out earlier than others to optimize their commute. Others generally arrive very late and cut out later than most for the same reason.
Sometimes people arrive early to get a jump on a particular task or to communicate with our overseas office. Sometimes people hang around extra because they are "in the flow" and don't want to put down their work until they have completed a particular set of work.
During our weekly one-on-one meetings, and at annual review time, I never talk about how many hours they put in, when they arrive, or when they leave - unless their performance isn't up to the expected level. I've very seldom had to do this, but on rare occasions, I have to tell people that they simply aren't working hard enough, and that the amount of hours they spend in the office clearly isn't enough to get their job done. Either they are miscalculating, they are in over their heads, or they don't care. If it's a miscalculation issue, we work together to figure it out. Otherwise (and if they don't correct the problems), they are eventually reassigned or dismissed.
I'd advise you to look around and get a good sense of the culture within your company. You will likely see some people who are steady workers, but not trying to get ahead, while others are harder-driving. You might see some who are "slackers". You will see some who always get their projects done on time or ahead of time, while others miss the mark periodically or often.
You will see some who come in early and/or leave late, and others who work to the clock.
Then, decide what you want to be, how you want your day and week to go, and act accordingly.