Before you start replacing things thinking it's a "gun" problem, it might be prudent to expand your consideration of influences that might be at work.
First of all, how experienced are you in shooting plastic-framed pistols, especially Glocks, and especially smallish pistols chambered in .45 ACP?
What ammunition are you using when this issue occurs?
Is the G36 properly clean & lubricated?
is it a current production G36, or did you buy it used? (Who knows what the previous owner did to it?)
Are you experiencing feeding or extraction and/or ejection issues? What's it doing, or not doing?
Do you have a currently certified Glock armorer in your area who could check out your particular G36?
FWIW, day in and day out, more than 90% of the "gun problems" experienced by the "average" owners of semiautomatic pistols are actually caused, in one manner or another, by the owners. (usually due to something involving familiarity with a specific gun, skillset, technique, experience, etc).
Ammunition issues follow that, but to a much lesser degree.
Actual problems with the gun occur least frequently of all, but can still happen.
Sub Club #9; .40 S&W Club #1953; S&W Club #3913
Retired LE - firearms instructor/armorer