How I fixed my buggy remote control for our Google Chromecast device

The actual name of the device is actually “Google Chromecast with Google TV (4K)”. It must be one of the worst product names ever.