theprestige
Penultimate Amazing
Congress (both houses) can change the law so that a President would not be able to fire an agency IG unilaterally.
Obviously there's a whole other discussion about whether they would, but they absolutely can do it (assuming it was signed or the veto overridden).
There's also a whole other discussion about whether the Legislature has constitutional authority to dictate Executive staffing decisions in this way. The constitution is pretty clear about which Executive jobs require Legislative "advice and consent". All three branches of government are pretty jealous of their constitutional privileges, and have historically rejected attempts to take them away.
I doubt any president would agree to comply with a law that prohibited him from making hiring and firing decisions within the Executive branch. It would require a Supreme Court ruling, at the very least.