That is true. But the rules that restrict us peons across the land rarely ever apply to our elected leaders. If I offered a generic prayer at our local elementary school here, there would be the devil to pay. And I would probably get shouted down if I tried to do it at a professional Isotopes game. It wouldn't necessarily be illegal but something doesn't have to be illegal in order to be effectively outlawed via political correctness.
As for those Senate prayers, we the taxpayer are paying those chaplains offering those prayers a lot of money:
U.S. Senate: Reference Home > Senate Organization > Chaplain's Office
The last I looked, the Senate Chaplain and his staff were paid:
Chaplain: $150,698
Chief of Staff: $129,223
Director of Communications: $86,056
Executive Assistant: $52,828
The members of the Senate can't offer a generic prayer themselves or invite a local pastor or rabbi or whatever to do it as a public service?
To me this is a blatant misuse of public funds. Our Senators can't find a good church and pastor or rabbi or whatever anywhere in Washington DC if they need pastoral counseling? Or if they all want to use the same one with office hours, they should pay this person out of their own pockets.
And there is also a Chaplain and staff that serves the House.