He believes that standing behind law enforcement is part of the path to holding his coalition together for re-election. Indeed it could be true.
That's contingent on one of the following - either:
A) Protest violence turns off voters (seems unlikely - protests have been turning less violent over time from what I can tell, which should help liberals/hurt Trump)
B) Biden/Democrats overplay their hand. So far Biden's avoided that trap in interviews when asked about "defund the police" - and answered the question very effectively(in my opinion). But there's still time for the Dems to screw this one up.
I'd take a different view - while Trump is a shameless narcissistic opportunist in most things, heavy-handed law enforcement is one of his few consistent, sincerely-held beliefs, dating all the way back to the Central Park five.