The answer is very simple. By default, Cucumber takes 5000 ms for asynchronous hooks, but we can configure it by doing this:
When(/^I open the page$/, {timeout: 2 * 5000}, async () => {