If there is any risk of you giving someone who says they have a nut allergy peanuts, you need to immediately change how you handle that, because you are risking putting someone in hospital, or worse. I'm not saying this to prove a stupid internet point; I'm saying this because I genuinely fear you might endanger someone, and you don't want that.
I have a nut allergy, and I only learnt of the botanical definition of a nut from know-it-alls on the internet, long after my initial doctor's appointment. In that appointment, I was told to go easy on peanuts because, even though I had never had a reaction to them (only a different kind of nut), there was a risk of one developing. That would, presumably, have been the time for the doctor to have told me that peanuts aren't nuts.
a peanut is factually not a nut
- https://www.dictionary.com/browse/nut?s=t - peanuts meet the first definition
- https://en.wikipedia.org/wiki/Nut_(food) - "In general usage and in a culinary sense, many dry seeds are called nuts."
- https://www.anaphylaxis.org.uk/fact-sheet/peanut-and-tree-nut-allergy/ - "Once you have been diagnosed with a peanut or tree nut allergy, you will need to avoid the nut or nuts you’re allergic to." does not make sense if "peanuts are not nuts". It also separates them into "nuts and peanuts" but since it does not always do this, the distinction is not the categorical one you are claiming.
- https://www.uhb.nhs.uk/media/z4xaw3rb/pi-immunology-peanut-and-tree-nut-allergy.pdf - "In this information leaflet we refer to peanut and tree nuts as ‘nuts’."
- https://www.betterhealth.vic.gov.au/health/conditionsandtreatments/nut-allergies - "The term ‘nut allergy’ can be confusing, because we tend to use it to describe an allergic reaction to the fruit of unrelated plants such as peanuts, seeds and nuts that grow on trees."
I hope this over-the-top reply is enough to convince you.