The gap in the seal looks massive compared to mine, are you sure the complete roof is correctly positioned?
If the front catches are engaging correctly then the seals are the problem.
They are all available from BMW but a little expensive, part numbers on BMW OEM.
Correct fitting is essential and regular cleaning and surface lubrication with silicone spray keeps them watertight.
When I had issues some years ago I got a waterproof cover to keep the worst of the weather out until I got garaged.
