Both Reagan and Obama did similar and there was flapping over the Obama ones from the Republicans. Maybe it's against the law, maybe not. The opinion you linked suggests it is. I guess we might find out in time.
https://www.washingtonpost.com/politics/2020/05/18/hypocrisy-watch-republicans-who-championed-inspectors-general-under-obama-stand-by-trump-purges-them/