Fix --with-python option not being honored when cache exists
When running ./configure with --with-python=pythonX.Y, if a previous
configure run had cached a different Python path in ac_cv_path_PYTHON3,
the cached value would be used instead of re-checking the specified Python.
This fix clears the cache variable when --with-python is explicitly
specified, forcing configure to always check the specified Python.
Fixes #41258