If a lawsuit is deemed truly frivolous, courts can already award fees as sanctions, though it takes time and money to get there. And even when there is a statutory or contractual basis for fees or an award of fees pursuant to an offer of judgment, plaintiffs may be corporate entities with few assets or are individuals who don't have any money or have their money tied up in their homestead or own jointly with their spouse. Threatening a potential fee award against plaintiffs who are not collectible isn't taken that seriously in my experience.