I lost a present from my girlfriend and bought the same present online and she still doesn't know.
That seems a little dishonest.
I only care about if she can detect it or not.
I can see why you would want to hide this from your girlfriend. Even if you're trying to do something nice it's wrong to be deceptive, you should explain to your girlfriend the situation with the present. Hiding this from her and her potentially finding out can result in distrust.
I think it's okay not to tell her the truth in this situation.
It may seem like you have a good reason for not being honest but bringing deception into the relationship is not a good idea in the long run. It's better to always be honest instead of deceiving people.