Joel is doing the exact same thing with his chewies in the pantry. He doesn't get them anymore bc he gets to obsessed with them and there not really safe.
But what I've been doing to make him stop barking is doing something else when he barks instead of giving him one, like when he barks I pretend he wants to go potty or whatever, and only give him a treat when he's ignoring the pantry. He's starting to catch on and barely does it anymore