Leverage does not directly affect your Profit and Loss (PNL). Instead, it comes into play when determining the amount of margin allocated to your position; higher leverage requires less margin, allowing you to open larger positions with a smaller backing. So, while leverage itself does not affect your PNL, it can impact your position size, which in turn can influence PNL.
What actually affects my PNL?
Aside from position size, PNL is affected by the difference between your Average Entry Price and Exit Price, Trading Fees, and Multiplier.
The calculation for it is the following:
Unrealised PNL = Number of Contracts * Multiplier * (1/Average Entry Price - 1/Exit Price)
Realised PNL = Unrealised PNL - taker fee + maker rebate -/+ funding payment
To understand further how Realised PNL is calculated, you can refer to the links below: