There is nothing to fix, most of the hub works like that. It is normal behaviour implied by the hub internal design. If you really want your pedal not to rotate when moving bike backwards, you can move to single speed, coaster brake, traditional Velosteel hub. Personally strongly dissuade.
![enter image description here](
edit after comment:
This photo should explain why wheel is not conjugated with chain, while no force is applied on the pedal. At the right side we can see rollers in its housing. It slides back and forth.
![enter image description here](
This photo is even better. 2 clutches. Moving forward pushes right against hub housing, conjugating sprocket with hub housing. Moving backwards pushes left against coaster brake pad. Pads does not rotate because of being engaged with brake arm attached to frame. Because of friction hub housing start to conjugate with brake pad.
No force applied - everything disengaged. ![enter image description here](