For Materials, G/L account will be derived from OBYC settings.
Only for Non stock item, G/L account can be made as editable. You can see that in Purchasing tab of components detail view.
For stock item, it will be derived from valuation class mentioned in material master.