Montevideo is more expensive than both
Panama and Buenos Aires. If you are interested in Montevideo, stay in “Pocitos” which is one of the safer places there, for example in 2022 there wasn’t a single murder there (haven’t checked 2023 numbers… But keep in mind that
Uruguay has wealth tax. Regarding quality of life, both Panama and Montevideo have better quality in my opinion (specially because of how woke are young people in Buenos Aires) but Panama and Montevideo are two types of lifestyles so better to visit both to see what you like the most
Basically common sense IE not making yourself a desirable target… LA is a big city, depending on where you are it can be safer or more dangerous than Panama