I think the recently released Xcode beta 5 has energy consumption issues that need to be solved urgently as it may damage MacBook screens.
When running the most recent beta 5 version for Xcode,
my M1 MacBook pro 16" loses approx 1% battery per minute and becomes uncomfortably hot on my lap.
Battery drain & heat seems to continue even when laptop lid is closed (and disconnected from any display to avoid clamshell mode); I really have to shut the laptop down or explicitly close xCode before closing laptop lid.
I think this is an urgent issue, as I already once had screen damage (orange burn in) to my previous MacBook Pro after having closed the lid before going to sleep only to discover the next morning Xcode had continued to cook my MacBook the whole night.
Best - Julius