To me it sounds like a over charge but this is really hard to detect, based on your description that it works correctly except on the hottest days.
Everything works great for a month then on a day that is a few degrees hotter a high pressure bypass kicks in (high squeal). if you shut it down and let it cool down it runs ok , or if you spray the outside coils with water it runs ok. (A possible trouble shooting test.)
I have only seen this a few times but the high pitch squeal on very hot days may be a safety (high pressure bypass possibly) .
If this is the cause the system starts and sounds normal but then the high pitch squeal kicks in and no cooling I have found this when the high pressure is over 400 psi.
Most recently when I found this I
Cooled the system down and it’s normal pressures were ~325. The only difference I could figure out was a few degrees higher ambient temp. Recovered a few ounces of refrigerant and the problem of low cooling went away but I found the problem by checking super heat and sub cooling pressure and temp checks something beyond DIY in many countries because of license requirements.
If the system sounds normal then the squeal, over charge may be the root cause based on your description and the short recording this would be my best guess with your description.