You can try putting it into sleep mode when you leave, but... surprise! Windows seems to be able to reboot your PC in sleep mode too (don't ask me how - every Windows 10 owner I've spoken to has had this happen to them at least once though).
The only solution I've found is to hibernate at the end of each day, and then restart. Windows can't do its 3am reboot if the PC is off. (You don't need to physically unplug it.)
This has worked for me on most projects, because all I want is to get back in the next day with all my windows where I left them - but I've worked on some projects where you want to leave the computer running overnight, because you need to run a long job, or you want to soak test something, or whatever.
What then? There appears to be no way to disable this stuff without some good degree of Windows IT Person skill. There appear to be multiple recommended methods, all of which seem not to work for at least some people, and all of which get undone for at least some people by at least some future updates. So this is all fine if you work a company that has a Windows IT person to look after this stuff for you, while you do your actual job - but not so much fun if you're trying to do it yourself. (And it's a total shit to test, because upgrades that need reboots don't happen every week.)
My "most hated Windows 10 features" isn't a very long list, but the enforced reboots is definitely #1.