There are two coils in the solenoid, a pull in coil and a hold in coil. If the hold in coil is bad it will cause a problem as you describe. Remove the solenoid and test it on the bench. Ground the base and apply 12V power to the #4 terminal. If it snaps in and stays in, it is OK. If it wants to bounce it could have oil in it but is likely defective.
Fred