Not all software engineering positions, or software engineers for that matter, would achieve their highest productivity working from home. Some might, but certainly not all. I think of it as more of a spectrum where the more you know what you need to get done and how to do it on your own, the better you are spending the day at home. And this can vary from day to day.
There are many benefits to working from home, as well as working in an office environment, but my point is that commutes will still exist for many software engineers for a long time.