First of all, relationship issues are often more complex. In a relationship, we may buy gifts for each other, which is not just a monetary transaction, but also an expression of emotion. As a result, asking for the return of gifts or spending money that has already been given can further complicate the situation.
However, the specific situation depends on the agreement between you and the reason for the breakup. If the money is for joint living expenses, or if there is a clear written agreement between you, then you may be entitled to demand it back. It's like in a relationship, if there is a written contract that says one party needs to return the other party's investment.
However, if the money is spent on feelings and good faith, rather than a contractual obligation, then it may seem premature to demand a return. Emotional matters are difficult to measure in terms of money, and such an approach can make an already complex emotional relationship even more rigid.
The best way to solve these kinds of problems is through mature conversations. Be honest about your feelings, listen to the other person, and find a solution that is acceptable to both parties. Perhaps you can agree together on what to do with the expenses that have already been spent, and how to maintain a relatively harmonious relationship after a breakup.
In short, emotional problems need to be dealt with in a nuanced manner, and different people have different ways of dealing with things. Through rational communication and respect for the other party's opinions, it may be possible to find a solution that is acceptable to both parties.