Unable to remove fields from line items detail view

I would like to hide/not show 2 fields/(and their labels) in line items detailview ONLY: vat and vat_amt. I have tried commenting out the lines in the Line_Items.php file (which is the one that is supposed to control the detailview) and nothing happens, even after a quick repair. Commenting out lines in line_items.js (editview) works fine. I’ve seen others with the same issue.

How can I stop fields from appearing on detailview? There has to be some other way.

Thank you.

Versions:
SuiteCRM 7.10.7
PHP 7.2
SQL Server 2014
Windows Server 2012 R2

I decided to make the same changes in the out-of-box Line_Items.php file and the fields disappeared with no problem. The question is why would the custom file not be overriding the out of the box file?