Can someone tell me what’s wrong with my goldfish?

He keeps going in this position and lying on the branches. He’s not dead or stuck cause when I tap the glass he swims away. I’ve had him since 2018, he’s living with another goldfish, the water qualities fine, and it’s a 20 gallon tank.

He keeps going in this position and lying on the branches. He’s not dead or stuck cause when I tap the glass he swims away. I’ve had him since 2018, he’s living with another goldfish, the water qualities fine, and it’s a 20 gallon tank.