State officials fight in court to preserve evidence and push for an end to Trump’s ‘invasion’