Heat a large pot over medium-high heat; grease with cooking spray. Cook beef shanks until browned, 2 to 3 minutes per side. Transfer to a large plate. Melt butter in the same pot. Add yellow onions, white onions, and kosher salt; cook and stir until soft and lightly browned, about 15 minutes. Stir in garlic; cook until soft, about 5 minutes. Stir in flour until onions and garlic are coated. Add vegetable broth gradually, stirring until it is absorbed. Season soup with Worcestershire sauce, liquid smoke, salt, and pepper. Return beef shanks to the pot. Bring to a boil. Reduce heat and simmer, stirring occasionally, until beef falls off the bone, 3 to 4 hours. Transfer beef shanks to a cutting board with a slotted spoon. Shred beef and return to the pot. Discard bones.