It is like this...
God's gift and anointing, once given is irrevokable, because He is
a generous and loving God, He never takes back what He has
given.
But if we live in rebellion and sin, the sin and rebellion will
corrupt and eat it up whatever good that is produced and end up
destroying our lives.
For example, corrupt preachers and evangelists...even bible
characters.
Samson had a gift of strength but he had lust, the gift continued
to work, but his sin destroyed him in the end.
Solomon had wisdom, wisest man, same thing, destroyed by lust,
hundreds of wives and foreign wives which was sin to God. God did
not take away his wisdom, but it corrupted and destroyed him and
his kingdom...
and many others.
So the evidence of the gift of God working and the anointing does
not equate to holiness and purity. Just because a man is anointed
and can do miracles, doesn't mean a thing, except that God has
given him that gift.
If we do not walk in obedience, sin will destroy us in the end.