Basically, you can't. And that's very annoying.
The shop should always default to your hero even if another hero is selected.