The desire to eventually back out of defense commitments in Europe is not in contradiction to that.
The political will to commit troops and to defend Ukraine simply isn’t there, especially not while Taiwan is looming. Wanting Europe to reindustrialize and handle it’s own defense allows America to focus more domestically and on potential wars more aligned with American interests (disruption of chip manufacturing affects America much more than Russian occupation of Ukraine).
I linked to a hoover institute interview with Niall Ferguson explaining a lot of the thinking. You can also just listen to what the administration has been saying themselves. You don’t have to agree with it, but the goal is reindustrialization of both America and Europe so America doesn’t lose it’s defense capabilities and so Europe can defend itself without relying on American support.