I'll offer my 2 bits worth here, since I've been working at home these past 20 years.
First of all, if you stick to a schedule and work 9-5 you'll be more productive than you have ever been because you are not attending useless meetings, discussing whatever TV show has the office hooked, helping some gormless colleague with work that's technically nothing to do with you, generally goofing off. (As a friend remarked - the problem with being self-employed is that the boss is always watching.)
Second, I like to bake and make cheese while working. You can do that with a proper kitchen 10 seconds away. Mindlessly stirring curds is a great mental time out, and pounding dough is great stress relief. You need to get up from the keyboard every 45 min or so anyway, and checking what stage your bread products are at is a good reason for doing this. Oh, and when we all had to suddenly self-isolate, I already had 30kg of flour at home as future bread, tortillas, pasta, cookies etc, and around 17kg of cheese in different stages of maturity.
Final rule - apart from those 10min keyboard breaks, don't do home stuff in working hours or work stuff in home hours. (Except shopping. Shopping at 11am once a week is great.)
Overall, working from home can be just as productive as office work, but you have to do it very differently.