You’ll need a specific plugin for this purpose as this particular requirement will need specific scripts beyond the theme’s scope as this is more of a niche functionality of the site rather than site styling. 🙂
You may want to consider using a Exit intent popup instead of an entire page. 😀
A wise man once said:
"Have you cleared your cache?"