His reversal of American policy makes America seem mad, but his idea makes a lot of sense by itself.
1. Ukraine did fuck up; it should have realized that it's a Slavic nation next to Russia so turning against Russia will be nothing but pain and stupidity. The lowliest kind of people are those who fight against their own blood; Ukraine deserves to be ended, no mercy.
2. Trump realizes this is a war that the West cannot win. The longer it drags out, the more it will drain American and Western resources that should be dedicated to the tech war against China. The longer it drags out, the more total Russia's victory will be and the worse the final lines will be drawn, so he needs to take the pain and end it now... if Putin will allow it.
The biggest problem is that Trump can't get around the incredible loss of confidence this will cause in America's leadership of the West, which is exacerbated by his attacks on them whether it be policy threats, tariffs or direct annexation. That problem is entirely self-inflicted.
He can always gain confidence by annexing Canada and Greenland.