"This is how realtime mesh rendering works anywhere. The opacity is applied right when the triangles are drawn, not after."
The solution to this unfortunately isn't a shader.
The mesh needs to be rendered to texture first (with a RenderTexture).
Then render that texture using a regular sprite shader.
The problem is capturing the bounds and generating the mesh that the RenderTexture needs to be mapped to. This is a per-game sort of thing.
There's theoretically a shader alternate but it wouldn't support texture alpha blending and you'll have jagged edges. It would be like a cutout shader, and it wouldn't perform well on mobile.
If you know of a modern 2D game that actually does this correctly, we could probably google that.