Bad tackle is a bad tackle. Doesn't matter if you were offside, play has stopped etc. You can still card a player for dangerous play even if a foul was committed previously.
Good to see refereeing is getting better and better with the use of technology.