On an acoustic bike with a rear derailleur, you do need to keep the pedals moving as you shift, albeit with lighter pressure on the pedals, as Alan DB posted. If you’re cranking hard on an acoustic bike when you shift, you’re adding wear and tear to the drivetrain. Conversely, if you stop pedaling completely when you shift, the derailleur has to haul the chain onto another rear sprocket without benefit of the chain moving, which is also tough on the drivetrain.
Now, on an ebike, the motor is assisting your pedaling. If you stop pedaling for a second, then enact the shift, the motor hasn’t had time to come to a complete halt, and the chain is still moving to some degree. This is good.... So you can stop pedaling for a quick moment right before a shift on a mid-motor ebike.
The Bosch motors have shift detection, which means that if you ease up on the pedals in anticipation of a shift, the motor will back off its power but still move the chain at an optimal speed when you shift. I don’t know about shift detection on Brose motors, but a little experimentation will show how much you should back off your pedaling cadence prior to shifting.