Water getting under vinyl top

After rain, I found the vinyl below the rear glass was full of water again (see picture) and is detached from the underlying metal. Where's the most likely source of the leak? Can I fix it by peeling up the vinyl and gluing it back down? I'm hesitant to damage the vinyl but I want to be able to drive/park in the rain.
rear_window_vinyl.png