The last line shows “Chrome Path C:\Program Files\Katalon Studio\configuration\resources\drivers\chromedriver_win32\chromedriver.exe” instead of the one in set property
Do you expect that a call to DriverFactory.getChromeDriverPath() will return the path from which the WebDriver instance (named driver) were instanciated?
No. The system does not work as you expect.
The call to DriverFactory.getChromeDriverPath() will always return the path of the chromedriver.exe bundled in the Katalon Studio distribution, which is static and never changes.
Then, is there any way to get the path from which the WebDriver instance named driver was instanciated from? — I am sure that the org.openqa.selenium.WebDriver does not implement such a method. But, as you already know, you are required to set the value of System Property webdriver.chrome.driver before calling new ChromeDriver() so that you are always aware of the path value. You don’t need that magical method.