You are using real logic, you need to use fantasy space retcon logic.
On open space ports, ships suck the atmosphere back in to not lose air using a gravity generator, which would cause the cape to blow towards the ship. Expect this to be a small plot point in "The Mandolorian and Grogu."