The onions are chopped too finely. How can I prevent this?
Use the metal blade and the pulse setting to get good results. Use the pulse function only briefly. Check the result each time after you have briefly used the pulse function to prevent the onions from being chopped too finely.