No one can really help you untill we know how the “static sites” are implemented, some “developers” code them really statically in the db without using the WP_HOME or WP_SITEURL or any other relativ path.
I’ve seen a lot of ‘things’ when it comes to WP and most of it was not really good as the best reason to use WP is because its cheap.
Could you provide usable datas? Like your Domain and one example page which is not working?
Why did you change the IP? Becasue you changed the server or the hosting environment? Maybe you are now on another Server?
If so: the chance of you made a mistake at the migration is very very high.
If not pls try the Plugin Better Search Replace to replace the needed strings in the DB. But be carefull and Backup first!
Have you also changed the DB-Credentials in your wp-config.php?? Cuz if not its still pointing to the old DB with the old Domain etc.
Also: this problem is not related to Cloudflare. Pls keep that in mind.