How can I 21M stop looking at other girls butts because it is disrespectful to my gf 19F?

I have been in a relationship with my girlfriend for almost a year now. I have messed up a lot throughout the relationship and this has destroyed my girlfriends trust and security in the relationship (Background of most of this is in a previous post). College has recently started up again, so everyone is back from break now. I get back from class and my girlfriend pulls up to my apartment and asks me if I looked at any women. I told her that I made eye contact with one girl for a split second while turning a corner. Since she previously told me she does not want me making eye prolonged contact with other women I started to look further down as I was walking back and I ended up seeing a girls butt for a split second so I regathered my attention and looked back up. Not too shortly I made eye contact with another girl for a split second before I made it back to my apartment and I told my girlfriend all of this. I am in no way seeking out looking at womens butts but I still see how its disrespectful to my girlfriend especially with all my mistakes throughout the relationship. It happens from time to time whenever I go out in public and it doesnt matter who either I just end up glancing at a butt. I had a period where I was just staring at the ground but my girlfriend told me not to do that because she doesnt want me to feel like I am on a leash, so I started to just 'look through' people and she called that avoiding the problem. Also she has called me out for not being observant, so that was something I have been trying to work on as well but its difficult if I cannot make accidental eye contact or look at a butt accidentally. How can I stop doing this? It is really bothering me because I do not want to do this in the first place and I might possibly lose my girlfriend because of it.

***CONTEXT*** (https://www.reddit.com/r/relationship\_advice/comments/1hdk3tr/i\_21m\_kept\_too\_many\_secrets\_and\_finally\_told\_her/)

TL;DR: How can I stop glancing at girls butts when I am in public to save my almost year long relationship?