It is considered a liquid because if take out of the container it wouldn't hold it's shape. If it can be poured, smeared, dipped it is liquid. However there is an exception to baby food. You are allowed reasonable amounts in carry on luggage for a baby. You should put it in a separate bag and declare it to the TSa agent. They may want to hand search and swab it and may ask you to open one or two.
If you check the TSA website there is more specific information about traveling with a baby
It is a "liquid or gel" as described above and generally subject to the 3.4oz restrictions but there are exceptions for reasonable amounts of baby food as needed for the flight. So you can bring milk, juice, formula and baby food for babies traveling with you in amounts the TSA deems reasonable for the duration of the flight but not to stock up for the entire trip.
from tsa.com
Declare larger liquids. Medications, baby formula and food, and breast milk are allowed in reasonable quantities exceeding three ounces and are not required to be in the zip-top bag. Declare these items for inspection at the checkpoint. Officers may need to open these items to conduct additional screening
Save Up to 30% on Rooms at Walt Disney World!
Save up to 30% on rooms at select Disney Resorts Collection hotels when you stay 5 consecutive nights or longer in late summer and early fall. Plus, enjoy other savings for shorter stays.This offer is valid for stays most nights from August 1 to October 11, 2025.
CLICK HERE