I worked as software engineer and my boss tolerated me going to office at 2pm and leave at 9pm. It's against company policy, certainly, but no one talked about it. It still is my most productive and happy time.
I'm changing jobs at the moment. I accepted a position at a UK office of an American company which I was a perfect fit for but they wouldn't tolerate remote working or flexitime. A few days after, I was offered a job at a UK company offering 80% remote work and very generous flexi but for £5000/year less. I let the American company know I wouldn't be starting with them after all. Honestly, it this day and age flexible hours and such aren't a big ask for most information workers and work-life life balance is too important.