Completely ignoring the chips, I generally prefer a desktop for anything that's going to be running all the time.
There are rumors that the Mac Studio will be getting an M5 update this year. If you can wait, it might be worth waiting a bit.
https://www.macrumors.com/2026/06/25/m5-ultra-mac-studio-202...