If you set the AnalysisLevel in the csproj to 7.0, the build times grow seemingly exponentially with the number of files in the project (not the number of embedded files, mind you). Forcing this to 0.0 makes the builds instant again as a workaround.
I timed my project's build time, and it came out at over 3 hours on GH Actions, and disabling the anylzer results in it taking seconds again.