Tech CEOs once blamed the economy for layoffs. Now leaders at firms including Block and Atlassian say AI is reshaping work — and shrinking teams.