They say be yourself and do not compromise yourself or dilute your essence to accommodate anyone else. It has to be understood that identity is tied deeply to a value system but not to something like desires which are just volatile in nature. Irrespective of the number of sacrifices you make in terms of not having certain things your way you only lose yourself when you compromise on your value system. If you consider valuing yourself as part of your value system then you will have to elaborate it to yourself.
Your system itself will recognise and react if it notices that you are being taken advantage of. The part that is harder to realise is recognising the compromise of your value system as against simply taking advantage of you. We all have our thresholds. We will realise it soon or later and come to our own defence and we will notice that sometime may have been lost but you are not losing ourselves in that. School there is value in saving some of that time but is not the meaning of losing yourself.
To lose yourself is to not adhere strictly to your value system. That is where the definition of self lies.