While you're right that Lightning L2 transactions generally aren't published on the blockchain, while following the lightning protocol, real Bitcoin transactions are passed between network participants that can be published by any of the participants if another other party doesn't follow the lightning channel rules.