I have potential deadly allergies to penicillin, amoxicillin and other sulfa drugs. However when my sons were born they claimed there was no need to be concerned that I passed them on to my boys.
To be considered hereditary there would have to be an observable pattern of people passing down allergies to antibiotics to their kids. Since there isn’t, it’s not.
Allergic reactions are due to your body overreacting to what it thinks is a foreign infectious substance, the body’s defence mechanism and reactions isn’t directly inherited like that. https://youtu.be/zk_oUk0bwxs