You can simply add waitForExpression('5s') to your request.
$request = \Gotenberg\Gotenberg::chromium('http://gotenberg:3000')
->pdf()
->waitForExpression('5s')
->url('https://my.url');
It's not in the documentation, but if you have PHP Intelephense, then it will hint you the available methods.
I'm using phpstorm's idea plugin.