Browser search isn’t working correctly with embedded html file

Hi everyone, first post here so I apologise if this isn’t in the correct place. I have dynamic pages on my website which show rich content from my collection. The rich content is embedded html code, which simply displays some text inside a stylised box. When I press Ctrl + F and search for a word that’s inside the rich content, it works once and then can no longer find words. It will however continue to find words outside the rich content box. I presume it’s because it’s no longer in focus, but I’m not a coder for the most part. Does anyone have any ideas on how to fix this? Or perhaps how to make a simple custom “find on page” search tool that will find it. Thanks