I think you are doubling up here on another topic you opened that seems very similar!
AFAIK
WiFi.off() followed by a short wait and WiFi.on() will reset the WiFi Module - repowering!
TCP/IP stack soft reset - not that I know of.
I use SYSTEM_MODE(SEMI_AUTOMATIC) and SYSTEM_THREAD(ENABLED) plus flags to determine whether WiFi out of range OR wrong credentials and also a background re-try process to check WiFi and Internet connection state. I thought @rickkas7 publish a code model as how best to handle the scenarios of disconnection and reconnection. Essentially with system threading it should just reconnect in the background but whilst disconnected you need to be careful not to call blocking functions.