Second, why your code doesn't do the STA connection along with WIFI_AP_STA in setup instead of setupStMode() function ? That would make STA connected permanently ...
Why this setupStMode() function is doing Esp.restart() each time it is been called ?
(That is maybe why your AP because invisible each time this function is called)