China entry quarantine rules, although eased, would currently rule out a four-day trip. What will happen by next April is anyone’s guess. Personally, as someone who used to visit Shanghai several times a year, I’d be wary of a visit in spring 2023.
Much depends if your ticket from Shanghai to Tokyo is integrated into your itinerary or is independent. If the former, you may be OK, if the latter then probably not.
Good luck!
Doc Copper