The PnL you see for an open position is calculated using the mark price.
This means that the value of the PnL you see is not indicative of a "real" profit or loss, but is meant solely as an indicator of the health of your position.
The only real assessment of your profit or loss can only occur once you have closed your position and will depend on the actual closing price, fees paid, and any cost of funding for its duration.