fix: improve error handling in patch_profiles_config to prevent requests during profile switching
fix: change error handling in patch_profiles_config to return false when a switch is in progress
fix: ensure CURRENT_SWITCHING_PROFILE is reset after config updates in perform_config_update and patch_profiles_config