I wonder if in other romance languages is the same, in Spanish and Catalan the two definitions are distinguished by being masculine or feminine. Fruto/fruit being masculine is the botanical fruit and fruta/fruita is the culinary fruit.
Almost, but not quite. Fruto and fruta are not two genders of the same word, but two different words, with different sources words (fruto fructus and fruta fructa)
Meanings are very similar, so there's a lot of mixup.
You're completely right, they are two different words. For me that distinction was so clear that I never considered that what I wrote could be interpreted as two genders of the same word, that would make no sense.