Generally a bayonet fitting is accepted as a safe way to leave an old cooker connection point.
But if unlikely to be reused better capped off.
If a DIYer is worried about them leaking then it is possible to buy a small aerosol spray can of leak detection foam into the socket and watch that it...