Products on wordpress site shows broken links

When I "x" out a product to have it not shown in the website, it also shows a 404 in serps when someone clicks on it while searching. Here "was" an example product :
https://www.buylandscapingplants.com/product/black-cohosh/
I took this off the "visable menu" and it showed a 404, when i re-enabled it as "visable" the 404 was no longer there. Why is this happening?