Purchase Invoice in Supplied Items table there is non-stock Item and cannot submit with it

We make Purchase Invoice (PI) corresponding with Purchase Order with Supply Raw Materials and BOM with one non-stock Item. In PI the Update Stock is checked…
In the Supplied Items table there is this non-stock Item and when we want to submit this PI the error (Item ACT-500500-0001 must be a stock Item) occurs and PI cannot be submitted.
This row is not possible to be deleted and this is the stopper issue for us. If someone has a decision, we will glad to help us.
FYI: in the Purchase Receipt there is no the such problem.
Installed Apps
ERPNext: v12.1.6 (version-12)
Frappe Framework: v12.0.16 (version-12)

linked Issue on github