If a major factor of a girl sleeping with you is the belief that you will be forming some sort of meaningful relationship, and you led her to believe that that was the case, then it is a pretty shit move.
Be ambiguous about your intentions, go to places where youre more likely to meet people that are also wanting to just hook up, but straight up lying is a dick move.
I will tell a girl that i am open to having a relationship with the right person, but I'm just seeing where things go for the moment. I don't straight up tell a girl i like her, and that i'm interested in her, fuck her, and then bounce. Pretty shit thing to do to someone's feelings just so you can nut