I agree that it is technically illegal, but if the most recent example of a conviction (that you can think of) was almost 30 years ago that tells you that it's effectively unenforced.
Does it? One conviction in 30 years is also consistent with the conclusion that not that many people get invited to give evidence to Congress, and the people that do tell the truth (or at least don't tell provable lies).
https://techcrunch.com/2018/04/11/is-zuckerberg-under-oath-c...
John M Poindexter was one who was convicted of lying to Congress: https://en.wikipedia.org/wiki/John_Poindexter#U.S._executive...