In my experience, there is no such thing as "getting through your tasks", as you are expected to pick up more tasks from a never ending bucket of tasks [1]. Of course this varies from place to place, but is in general true. Your peers and managers are more likely to notice you leaving early, or "not working" on the Friday, than they are to notice you working your butt off on the previous 4 days, to be honest.
[1] Edit: this is because of the nature of knowledge work, and the difficulty in estimating duration of work, difficulty, and quality. If you finish early, the powers that be are more likely to attribute it to bad powers of augury as opposed to extra hard work. This might sound overly negative, but I have seen this consistently throughout a few decades of experience (yet, I still work hard... go figure).
One of the most important changes for me, going from normal employment to self-employed, was no longer being paid by the hour. I don't know what it is about it but when I'm on the clock, all I can think about is the clock. I love being rewarded financially for being more efficient than expected and finishing early, and I love having the liberty to take a bit longer (and accept that it's not going to earn me more money) to get the job done right to my own satisfaction.
Also I dont spend less time at work, I just use post lunch hour, and 30-60 mins throughout the day to do learning.
I feel like as long as you prioritize your work well and you make sure to finish enough high-value tasks employers tend to not care too much about whether you actually fill up 40 hours with these tasks. Being able to use any left over time for myself also incentivizes me to stay productive so I'm pretty happy with this system.
Ultimately there is a trade-off between spending time at work and for yourself/friends/family. What the OP and other recent posts are increasingly showing is that the amount of time we really need to spend at work (perhaps especially if you are a knowledge worker) is not as much as our normal hours dictate.
Culture is a strong force.
I often use company time to learn about new things that are related to my work, but not necessarily immediate tasks. For example - While working on a Java app, I will spend some time learning AWS or Kotlin. Not one person in the companies I have worked for ever told me off for doing that, most in fact encouraged it. My personal diary/notes suggests I spend between 25-30 hours/week doing actual tasks or attending meetings and remaining I spend socializing at work to build relationships which will help get things done for me or learning. This of course is average over a year, some weeks are more work heavy (even stretching to more than 40 hours) and some less so.
I have come to prefer it instead of shorter work week, which means same amount of work needs to be done in less number of sleep/break cycles, reducing the quality I produce. When I worked for myself, I used to work only 3-4 days a week and observed that in theory it sounds good, but my personal experience was, I was spending far less time subconsciously and output was not inline with my usual quality.