Power off frozen Macbook with a touch-bar
The TouchBar mac with Touch ID sensor is a physical power switch, so pressing and holding it will shut down the machine as long as two things are true:


The button physically registers your push.
The SMC is listening and will initiate the power shutdown.




https://support.apple.com/en-us/HT201150

Barring those, if you press for 20 seconds gently yet firmly, you may have to wait for the battery to discharge and then charge. Watch your backup in case the machine needs hardware service or a reset of the SMC / restore or revive of the T2/SMC.