I agree with the sense of your post, but your example is wrong.
The Radical Republicans who controlled Congress in 1867 passed the Tenure of Office Act which required Senate agreement to dismiss any official whose appointment had required Senate confirmation.
Andrew Johnson believed the Act to be unconstitutional, and he was impeached for violating it by removing Edwin Stanton as Secretary of War and sending a replacement to the Senate for confirmation.
The Act was unconstitutional. I don’t know if it was ever decided one way or another in the USSC but it seems patently uncon.