Easiest way to test whether something was written by ChatGPT would be ChatGPT storing all its generations. The store could be anonymous and wont have to be public, its sufficient if you can ask ChatGPT about whether it ever wrote a given piece of text.