I think that it is wrong to get too hung up on Trump and think more about what we know about the US and it's long term behaviour.
This is what I remember them always doing.
They are in, they are enthusiastic, they fight an enemy- Iraq, Vietnam, Afghanistan etc.
Then it costs a lot, public opinion turns, they're out.
What usually happens is that they realise that there is no win.
Vietnam- the Viet cong could not be defeated, just managed, Iraq- achieved their goal then didn't know what to do, Afghanistan- the Taliban carried out guerrilla warfare, checkpoints, and assassinations.
Pulling the money out is always undignified and chaotic, the Afghanistan pull out left the Taliban millions of pounds of equipement,
thousands were left stranded, etc.etc.
Ukraine in the first two years they thought that giving enough arms and money to Ukraine's army would get results but it didn't work and it has ended in a stalemate-
My advice to Zelensky would be to move quickly and try and tie them to as many obligations of continued money and support for protecting the border as he can get out of them, move quickly because they are out.