This is expected behavior. A single radio can only operate on a single channel. So one that is used for both sta mode and AP mode must first connect to the upstream to determine what channel needs to be used before it can bring up the AP mode config.
There is a package that is designed to allow graceful failover in this situation a check out travelmate.