When calculating PnL we ignore leverage.
When calculating ROI, we take into account the leverage you use. This means that there may be configurations when your P/L is negative when ROI is positive.
For example, if you start to trade with a 3x leverage and have positive PnL and then change it to 1x leverage and have negative PnL, you may get an overall negative PnL but still an overall positive ROI.
It can even be the case that ROI in % is positive, while PnL in $ is negative. This is possible if you increase the amount of funds used in your strategies:
On the contrary, if you decrease the amount of funds after a few trades, your ROI may be negative while PnL in $ is positive: