To assume that Palpatine in TROS is in the same body from ROTJ - a movie whose script said that his body exploded - you would have to assume he somehow teleported from Endor to Exegol ( or wherever ). As there is no evidence of such a power anywhere else in the films, this does not seem like the most reasonable assumption.