If you're running it in a Task Sequence, you should control the entire process once the TS starts and ideally, prevent the user from doing anything on the device until the upgrade is over to reduce the risk of upgrade failure.
The goal of using a task sequence is to upgrade the device as fast as possible, and get the device back to the end user after the TS is done. If you want to allow the user to have control over reboots, I'd recommend using Servicing.
For the Task Sequence, I'd suggest adding native popups to when the TS starts (when launched from software center) to warns the end user that the upgrade is starting and the device will be rebooting several times.
For very detailed processes of using a Task Sequence, check out this info:
https://garytown.com/waashttps://garytown.com/waas-1909-ts-downloadNote, if you're upgrading anything Windows 10 2004 (20H1) and newer to 22H2, don't use a Task Sequence, use enablement packages.