How Can Something Be a Fruit and a Vegetable?
This confusion stems from a misunderstanding of terms. People are conflating the two definitions of fruit. Fruit has both a botanical and a culinary definition.
Something may technically be a fruit by the botanical definition but be a vegetable by the culinary definition. That's what happens with all of the confusing items like cucumbers, corn, and tomatoes. This makes it technically both.
Now, unless you are a scientist studying botany, you are unlikely to care what something is botanically. In everyday speech, you should call these "confusing" foods "vegetables" because that's what they are practically. People may say that they are "actually fruits"—and they would be right if you are talking about the different parts of a plant and its flower or something. But if you are talking about them as food, calling vegetables "fruits" is wrong. To use the word like that would just make it largely meaningless.
"Science" does not say otherwise. For one, botany is just one field of science. There is also such a thing as culinary science. Second though, names are not a core part of science. You cannot test and reproduce the results of naming something. They are just names people attached to different concepts they made up to make keeping track of them easier. Nothing about what botanists call parts of a plant should influence your cooking.
So what is a "fruit" then?
What makes something a "vegetable"?