Food security is not an issue at all. For example in Germany around 20% of all farmland is used for "energy plants" (biogas etc.). Even in Germany solar planels have around a 28 times higher efficiency per area than biogas plants, so there is a lot of potential to repurpose farm land without changing food production at all.
>there is a lot of potential to repurpose farm land without changing food production at all
This takes years, which isn't enough in the case of a major food security event, i.e. war.