That is probably the thing I would be mad about as an murican.
The support Ukraine has gotten in military aid and humanitarian aid from all of Europe and the US is tremendous, they should probably afford foreign nationals from their supporting countries with overwhelming courtesy.
They could have just deported the idiot and sat him in the next flight to Berlin or something. After he got in trouble, he desperately WANTED to leave.
His crime was nonviolent and didn't really harm them, indeed, imprisoning him made them look worse and they knew he would be in danger in any facility they put him in.
Just getting him out of the country and barring him from reentry as a russki-sympathizer would have been the best solution for everyone involved,