He is not fighting against ISIS, he is fighting for Assad
Because Putin is not an idiot.
The idea western governments seem to have is that they can air-strike IS out of existence. Reality check: you cannot bomb a state out of existence short of using nukes and killing everyone within its territory. The idea that they can drop bombs on a few buildings and get rid of IS is about as realistic as the 9/11 hijackers idea that they could destroy America by destroying a few office buildings. Who cares? Countries and governments are spread out, and stronger than that.
The only actual way to expunge IS from the world without literally glassing half of Syria is to have boots on the ground, an army that is close enough to the action to separate friends from foes, and a credible replacement for IS once it's gone. Western powers are unwilling to provide either of those things: they won't put soldiers on the ground, and they don't know what would replace IS if it was gone. Oh, wait, maybe those "moderate" rebels (lol).
Russia and Putin, whether you like them or not, are clear thinkers. To get rid of IS they need an army. Assad has an army. Check. They need a credible replacement for IS. Assad is such a replacement. He may not be a good leader, indeed in many ways he's incredibly bad, but there don't appear to be any good leadership candidates in Syria and Assad is at least a good old fashioned mostly secular dictator, as opposed to a crazed death cultist.
One problem - Assad is on the verge of losing against the "moderate" rebels (like al-Qaeda) who are being armed by the CIA. The CIA doesn't have a fucking clue what will happen if Assad falls, they just aren't capable of thinking that far ahead, but it's fair to say that the bits of Syria where women can walk around dressed like westerners will quickly become .... not like that.
So Russia props up Assad. That mostly means hitting the "moderate" rebels. If Assad manages to stabilise his position and regain control over the areas currently controlled by the non-IS rebels, then there's a credible battle tested army that's fighting for its own existence ready and waiting to go to war against IS.