In the Old Testament the continued presence of The Holy Spirit depended on obedience by the individual. In the New Testament the indwelling of the Holy Spirit depended on the obedience of Christ.
No Turning Back /5
Then Jesus spoke to them again, saying, “I am the light of the world. He who does not turn back from following Me shall not