Gary Shapley, the acting commissioner of the Internal Revenue Service, is being replaced after Treasury Secretary Scott Bessent approached President Donald Trump to say that Shapley was placed into the agency without his knowledge and at Elon Musk’s direction, according to a source familiar with the discussions.