Outside of the moralized "Santa Claus" worldview that is fed to children, and simplistic propaganda/click-bait/news for the masses, international relations are always complex, highly compartmentalized, and subject to tight "current rules of engagement" control in each little area.
That helps keep things calm, predictable, & controlled. And provides thousands of tiny "carrots & sticks" levers for leaders to fiddle with, while having to think about maximizing their nation's advantage in each of many little areas. Vs. the obvious dangers of a relationship state space where "at peace" and "total war" only had a few intermediate states between them.
In principle yes, but the current situation is still exceptional. There used to be a variety of areas of cooperation, e.g. in science projects, between russia and the EU states. This was kept up even after the annexation of Crimea on the same basis as you describe. However, after the invasion started, much of it has been shut down.
The Apollo-Soyuz mission was conceived, approved by top-level leadership in both the U.S. and U.S.S.R., and mostly planned while the U.S. military (not just local proxy forces) was still heavily and directly engaged in the Vietnam War.
The US had nothing because the Russians were available, not the other way around. The US would've prolonged the Space Shuttle program if it wasn't for the cheaper Russian services.
Science is bigger than politics and war. The US and Russia still worked together in the space area during the cold war in some ways, despite the two nations being a hair away from wiping each other off the face of the earth
Your question played out in the movie 2010 The Forgotten Odyssey [1] There are more scenes of them starting to get along despite the US/RU governments being hostile to one another. I can only hope the movie got it right.
The US has been subsidizing Roscosmos for a while. It wouldn't look great if Russia pulled out of the ISS. Also, I thought I read something about not wanting to lay off rocket scientists and have them go looking for work in Iran or North Korea.
Because countries don't always act on principle but almost always try and do things that will benefit them politically or strategically. There is nothing to be gained in a political or strategic spectrum by unravelling the space co-operation relationship. Putin + Rogozin already saber rattled on the topic to signal things to the Russian public, and Putin's key problem is his faltering war. The actions of astronauts are not meaningful.
The same is true from the US perspective, except this way they can demonstrate an ongoing commitment to stability, co-operation and science.
You may as well ask why not declare all Russians in the US as persona-non-grata and deport them?
That helps keep things calm, predictable, & controlled. And provides thousands of tiny "carrots & sticks" levers for leaders to fiddle with, while having to think about maximizing their nation's advantage in each of many little areas. Vs. the obvious dangers of a relationship state space where "at peace" and "total war" only had a few intermediate states between them.