What you describe sounds a lot like a food allergy. Simplified, food allergy creates a craving for food we should never eat. After allergy tests, my allergist said I was probably allergic to dairy and onions (favorite foods: burgers topped with onions and pizza). He said, totally avoid dairy and onions for 2 weeks. If the tests are right, after 2 weeks of total abstinence, you will have no desire to go back to eating either of them. The tests were right.
Try the allergy test. Stop trying to emulate beans and avoid all flavors that remind you of bean dishes for 2 weeks.