How getPageSource works in Katalon Studio?

https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebDriver.html#getPageSource--
If the page has been modified after loading (for example, by Javascript) there is no guarantee that the returned text is that of the modified page. Please consult the documentation of the particular driver being used to determine whether the returned text reflects the current state of the page or the text last sent by the web server
Do you know how getPageSource works in Katalon Studio?

I assume it’d be the same way - you get current state - Katalon is not able to determine, if the page source code is final or not. Moreover, no framework can know that.

First, you should wait for an element from final page state and then get a page source.