I go for a flat, and skip the extra hour commute a day. But I find commuting exhausting, some people aren't so bothered.
It depends IMO whether you will really enjoy gardening, and whether you will actually spending lots of time in your garden, if you are spending at least 5 more hours a week commuting before you can even get into the garden - will it really feature strongly in your summer evenings and your weekends? Commuting more costs a lot of money too, not only the cost of the commute itself but often leads to higher spending on food and other things. Kitting out the garden can also be expensive.
I would personally go for a flat with it's own outside space, either a balcony or patio, or some grounds for the flats, or near a park, river or lake that you would actually use. Preferably all the above which is what we had in my favourite flat. Playgrounds and softplay indoors if you have kids would be high on my list too, and lots of sporting facilities for kids or if you like sports yourself.
I've lived in a variety of places including flats and houses, rural, town and city, so this is based on my own reality not hypothesis. Sometimes one or other of us was commuting, sometimes not. It depends also on things like how it will effect your work and social life, including 'work social life' and other aspects of your life too.
Just consider the reality before you make the move, is my advice, rather than the dream. There's a reason that people are moving back into cities post-pandemic, it hasn't always worked for people and it's not just about WFH versus back to the office.