The problem with caulking the top of an exterior flashing (or bottom in some cases) is because the caulk prevents the flashing from shedding water as it was designed to. When the caulk breaks down or develops cracks, moisture is trapped against the house and cannot drain off the flashing properly. In most cases the solution is to remove the caulk and ensure the flashing is installed properly.
As with any installation issue, consult with your window/siding manufacturer or a qualified exterior contractor on best practices for your specific siding.