I have been teaching guitar for 41 years. The biggest predictor, bar none, for who will carry on and who will drop out is the capacity to enjoy and celebrate every gain.
A student who comes in, wants to sound like Eric Clapton, and then expresses constant frustration at how long it is going to take, how far from that he or she is, etc. will probably last no more than 6 weeks.
A student who feels like - omg, I am playing the guitar!! when they learn 3 chords, ion the other hand, and who makes the effort to notice what they can do today that they could not do last week is usually a student who is in it for the long haul. They learn faster, they have more fun, and they stick with it.
this is something you have control of. Cultivate that sense of "look at me go!!!!" and enjoy every tiny step and victory. The process has to be fun because you never really "arrive" - you just keep improving and widening your skill set.