Chrome extension disappears after odd refreshes

I am developing a Chrome extension for Gmail.

Ideally, as soon as the user signs up and opens any mail from the inbox, the extension should appear just before the Reply button.

The problem is –
The extension behaves in a weird pattern. It disappears on odd refreshes, and sometimes it disappears on refreshing the page on multiple of 3. There is no specific pattern.

I have tried a couple of things but had no luck solving the issue.

I also found that when the extension doesn’t appear, the control doesn’t even go into the gmail-injector file.

Does it have anything to do with the Manifest file or Mutation Observer? I am confused.