They know it’s unconstitutional.
They also know it'll never pass the senate. And they don't want it to.
The Supreme Court kicked back a number of gun bans to the lower courts for review in light of their 6-3 New York ruling. SCOTUS' way of saying, "You can handle this at your level or we'll handle it at ours."
The last thing the Democrats want is a SCOTUS ruling that strikes down "assault weapon" bans in the many states that have already enacted them.
This is nothing more than throwing a bone to their base, saying "We tried to do something." Much like when the GOP passed various Obamacare repeals that they knew would get vetoed. It's all theater.