That happened to Spike Lee, with his "Malcolm X" movie. The big problem was length. The completion bond company pulled the plug at one point. Lee found enough rich black people to bail out the production, and eventually released the 202 minute version. It was a critical success, but just too long to make money in theaters.
With the notable exception of "Gone with the Wind", few Hollywood films over 3 hours made money.[1] This is less of a problem today, because there are alternatives to theatrical distribution. Long-form mini-series are a thing, and home screens are good enough for epic movies.
IMdb says of Megalopolis, "It's 138 minutes long, but feels like it exceeds the three hour mark." The worst of both worlds.
[1] https://www.digitaltrends.com/movies/the-longest-hollywood-m...