In theory, if that even applies anymore, SCOTUS rules on the constitutionality of an issue.
So, I'd say if an issue didn't pass SCOTUS muster, the bill could be rewritten by congress to make it constitutional, but they couldn't pass , on their own, and without amendments, a bill that SCOTUS has already said was unconstitutional. Congress/senate can't change the constitution.
That was the bullshit about the ACA decision. IIRC, The ACA was unconstitutional, but Roberts rewrote the parts necessary to make it constitutional. Not 100% sure, but I think it had something to do with it being a tax or not, and how it originated in the congress/senate.