The AirPods may not be sitting properly in the case even if they appear to be in there, try to clean the inside of the case out with a q-tip to remove dust or dirt that may be in there as well as a quick wipe down of the AirPods with an alcohol pad. Once you put the AirPods on the case try wiggling them around a little so they are registering as inside the case properly and close the lid firmly, not slamming it though. If you need to disconnect AirPods manually go to your Bluetooth settings in settings app and click the “i” in a circle next to them and scroll all the way down and hit disconnect device