Hi I replied on your other thread so got a bit of insight to this tank.
As I said before your two gallon tank is too small for a goldfish. As I said before in a new tank there are high levels of chemicals that will kill your fish which result from the fishes poo. The swimming around stressed nature of your goldfish indicates that I am right.
You need to get a much bigger tank if you want to keep goldfish, you need to do water changes if you want to keep fish. The reason your shark jumped out is because of bad water and it died because of the bad water as well, the reason your goldfish is acting like this is because of the bad water. When I say bad water I mean you will have high amounts of ammonia and nitrite in a small two gallon tank.
I suspect the frog will end up the same way.
Please listen to our advice otherwise you will keep loosing fish over and over. In your other thread about your albino shark you got a lot of good advice on why they died, jumping out may have been a factor in their death but in a small uncycled tank with a goldfish they died because of the bad water quality.
Wills