Water Dispenser periodically works

The refrigerator water dispenser periodically works. The ice maker works fine. When you first try to dispense the water, there’s a 5-10 second delay before it works. If you continue to dispense the water it works fine as long as you do so right away. In other words, when you depress the water dispenser lever you have to wait 5-10 seconds before the water starts coming out. If you depress the water dispenser lever shortly after using it, it comes out right away like it’s suppose to. The water filter was just replaced. Could the dual solenoid refrigerator valve be causing this problem?