Hi and welcome to the forum! That indeed does seem a little conflicting. What you'll find is that ebikes with a rear derailleur need the pedals to be moving as you shift, just with lighter pressure on the pedals. This is probably why the Trek manual says to keep pedaling while you shift.
In your case the Bosch motors have shift detection anyway, which means that when 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.
So I would keep the pedals moving while changing, but just with very light pressure. Hope this helps!
Let me add tha on an ebike, the motor is assisting your pedaling. So if you stop pedaling altogether for a moment, then enact the shift, the motor hasn’t had time to come to a complete stop, so the chain is still moving to some degree. This is good.... it means you can actually stop pedaling for a quick moment right before a shift on a mid-motor ebike.