Government borrowing rose to the highest amount since the pandemic in July, official figures show, as public sector pay increased.