The government borrowed more than expected last year, placing more pressure on the public finances ahead of the full impact of US tariffs.