Yeah, well, except if you construct a mixer that is indeed based on commitments and / or smart contracts that run on the blockchain.
I don't think there's a way to do that and gain the same privacy you would (without any on-chain connection). There are solutions which improve your privacy non-centrally, such as
JoinMarket, but the inputs and the outputs have an on-chain connection.
I'd be appreciated if you explained how could this work, but as far as I can tell it's impossible unless we entangled it with the Lightning Network which would then create other kind of problems (such as liquidity).
You could also argue that building something that leverages the LN for mixing would increase its usage and motivate more liquidity!
The idea would be something like:
payments usually ┌────────────────────────┐
split into │ │
multiple routes │ │
┌─────────────────►│ Lightning ├─────────────────┐
│ │ Network │ │
│ │ │ │
│ │ │ │
│submarine swap └────────────┬───────────┘ submarine swap│
│ │ ▲ │
│ ▼ │ ▼
┌───────┴──────────┐ ┌────────────────┴───────┐ ┌──────────────────┐
│ On-Chain input │ │ Intermediary LN wallet │ │Destination │
│ address │ │ │ │On-chain address │
└──────────────────┘ └────────────────────────┘ └──────────────────┘