I had the same issue before when I was using a WE m16. The bolt doesn't lock back when the mag is empty. So I ask my buddy what to do because I am new to GBBR too. He gave me ideas on what to do, and ended up shimming the bolt release button with gearbox shims and not it locks but sometimes doesn't but not all the time.
It's hard for me to explain, so here's a picture. the shims can be seen if you really look into it, but it's not noticeable.