I want to have the client connection optional, so that I can have a local network without internet access all the time and I would connect the router to my hotspot only if I need internet. Is this possible to configure?
This is expected behavior if you are using the same radio for both client and AP mode. The radio must make the client (sta) mode connection first because that determines the channel. The radio can only operate on a single channel at a time. Whatever channel is used for the sta mode connection will be used for the AP mode, as well.
Look at Travelmate as a method of managing the situation where the upstream wifi network is not available.