I have a MacBook Pro M1 Max, and when I shut it down, it automatically boots up again. Even if I put it to sleep and close the lid, it still turns on by itself. I don’t have any peripherals connected.
I’ve tried reinstalling macOS (Tahoe 26.1), resetting and reinstalling again, and even downgrading to a previous version (Sequoia), but the issue persists.
old issue, new issue, what changed?
keep the Mac on the charger for all testing of the issue...
If the lid is closed how do you know it "still turns on by itself." ???
The current stable release of Tahoe including bug fixes, security updates is macOS 26.1
Keep your Mac up to date - Apple Support
Keep your Mac up to date - Apple Support
You can verify some settings— >System Settings>Battery>Options

A SafeBoot Start up your Mac in safe mode - Apple Support will sort many anomalies
Reboot as normal and test. Caches get rebuilt automatically.
no resolve—
Call Customer Support (800) MY–APPLE (800–692–7753)
or on line https://getsupport.apple.com/
or call AppleCare Support at 1-800-APLCARE (800-275-2273)
Outside the USA—Contact Apple for support and service by phone
See a list of Apple phone numbers around the world.
Contact Apple Support - Apple Support
if it is the hardware failing take it in— independent of your user diagnostic
In or out of warranty you can get a free over the counter 'Apple Service Diagnostics' test /assessment
Make an appointment for a "hardware issue"
Genius Bar Reservation and Apple Support Options - Apple
Outside the USA
Contact Apple Support - Apple Support
It is possible a Revive /Restore firmware would be the resolve...