eject heat to the outside as well. This usually presents itself as working better while driving that when stopped or just starting.
I have also had another time when the cabin air filter is really blocked and it doesn’t allow air to flow across the evaporator well.
Finally, one of our cars has a hard time when starting in really high heat. I don’t know why. The low side pressure is good and I can hear the compressor click on, but then goes off almost immediately. After driving even a block or two the compressor stops shutting off and it works as expected.
Edit: that last car with problems in high heat is a Nissan Pathfinder