There is no universally accepted answer for the main problem here which is the denominator for the return calculation is zero or near zero. There are a few common solutions to this issue.
The most simple solution is to use the total portfolio notional as the divisor for the PnL. This can be considered the PnL contribution of that long/short sub-portfolio to the total portfolio.
Another common but more complicated solution is based on capital locked up. To get into long/short positions or portfolios of these positions you often have to post some margin or a margin on a portfolio of these positions. The return is than calculated against the cash locked up to meet the margin. Now the margin varies from day-to-day so you can use this daily number or in real life more commonly you use a constant number larger than the actual margin which is buffer you have set aside to meet this margin. For portfolios of these positions this is similar to risk-budgeting which approximately proportions the cash locked up for each sub-portfolio.
The nice thing the Sharpe ratio will be very similar no matter which method is used. As long as the returns and volatility are both be calculated using the same scale it doesn't matter if the scale is large or small for a ratio.