It seems that there is a problem in the report “Profit and Loss Statement” with the “Billable expenses - invoiced”, where a figure exist but “Billable expenses - cost” is zero, when the report refers to a tracking code. when the report in not for a tracking code, then everything is fine. Server manager ver 21.06.6:
I can duplicate this. I have moved the topic to bugs. It is no longer possible to apply tracking codes on purchases when they are destined for balance sheet accounts. So it seems that when a billable expense is invoiced, the program should apply the same tracking code assigned on the sales invoice for the amount posted to Billable expenses - invoiced to the cost posted to Billable expenses - cost.
I am not sure simply reverting to earlier behavior will solve this problem. Although you could formerly select a tracking code when posting to a balance sheet account, the program ignored the selection. So this very same problem may have always existed. A solution seems to require the ability to assign tracking codes to general ledger transactions that are not directly associated with a line item on a sales invoice (or other transaction form).
The posting to Billable expenses - invoiced in @pandhm’s example comes directly from the sales invoice. But the posting to Billable expenses - cost is a secondary transaction, part of clearing the Billable expenses account of the invoiced expense. I suspect code for picking up secondary transactions and assigning tracking codes has never existed.