How are East and West defined on other bodies of our solar system? I noticed that East and West appear swapped on maps of the Sun, even though the Sun rotates around its polar axis in the same sense as Earth.

See for example below Sun disk with a Venus transit diagram or also here.

So, at least for the Sun, East and West are defined from an Earth observer viewpoint. This makes me wonder: How are East and West defined on other bodies of our solar system?
Actually, it is a bit contentious. The IAU defined the North Pole of a planet to be that axis of rotation which lies north of the solar system's invariable plane. Which means that it is possible for bodies to rotate retrograde, and Venus and Uranus are considered to rotate retrograde with this definition. This definition is not universally accepted.

From early periods when solar maps were drawn, they have been labelled such that features appear on the "Eastern" limb of the sun and move to the "Western" limb, though this means that they are moving from Earth's East to Earth's West. This convention hasn't changed, though things have changed for the moon, just to confuse things.