The court blocked an injunction that aimed to halt state police sweeps at homeless encampments across the city.