We'll never know. But at the very least, there are clearly plenty of other factors in play than who is the US President. For example, Putin has spent a great deal of the Covid pandemic being isolated; Putin has spent the last couple of years narrowing his inner circle of advisers to remove dissent; and Putin, who's probably always had half an eye on Ukraine and clearly resents its existence based on that deranged speech before this war, might have felt encouraged by watching the collapse of Afghanistan into thinking that something similar would happen here.
Some or all of these will have influenced his thinking, and are far more pertinent factors. And, since NATO wouldn't have intervened militarily regardless, then at the very least I'm unclear what exactly Trump could have said or done, even assuming he *would* have been tougher-sounding against a Ukrainian invasion, that would have changed Putin's mind.