Yes, this is possible. If you have a Buy position, for example, you need to place your Take Profit above the current market price.

If you are placing Take Profit when your trade is in loss and do not set it not far enough above the current market price (in other words, if you place it below the opening price of the trade), it will act as a Stop Loss and your trade will be closed with a loss.