Your daughter isn't capable, at almost two, of tact or empathy. She simply can't understand how or why this might be painful for you, even if you and daddy tell her over and over. That's a developmental capacity that she hasn't achieved yet.
It's so normal for kids to "prefer" the attention of one parent for awhile, for weeks or months. Not infrequently, they'll switch to the other at some point. It's inexplicable to us, and it can hurt. We give so much of ourselves to our beloved children. My 4yo grandboy has switched allegiance a couple of times. For awhile daddy felt left out, then mommy felt rejected.
Fortunately, each parent endured the inevitable favoritism with endless good humor and patience, and the preferred parent made every effort to cheerfully include the other in activities, games and conversations. The teamwork eventually seemed to swing my grandboy back to center, but maybe he would have gotten there anyway.
It's important not to let your daughter know that her spontaneous feelings have hooked you. This can become the basis of power tripping later on. She's not capable of that now, but she'll begin to feel the potential for manipulating you as she gets older.
Hope this doesn't last too long. Your daughter really does love and need you.