Given the data in previous posts, and the fish appearance, I would first consider this to be a water issue.
The GH and pH are too low for livebearers; these fish must have moderately hard water as they need the calcium (primarily) for their physiological functions to properly occur. The GH appears to be in the 60 ppm range (= 3 or 4 dH) which is too soft. The pH looks like it may be below 7, which is acidic, and it should be above 7 for most livebearers. When kept in soft and slightly acidic water, compressed fins, shimmying, fin degeneration are common. There is no treatment other than providing harder water. That is easier said than done, but I don't know what other fish are present, and if they are soft water species, they may have issues with hardish water.
Second water issue is the nitrates. They seem to be around 20 ppm ? This is as high as you ever want nitrate, but if you can get it lower, the fish will benefit long-term. As close to zero as possible. Now, when you say they spike a lot, it suggests the tap water (used for water changes) is not likely the source of nitrate, so this is occurring solely within the aquarium. Is this correct? Test the tap water on its own for nitrate to be certain.
Nitrates that occur within the aquarium can be controlled by a number of things. Not overstocking, not overfeeding, regular substantial water changes, keeping the filter well cleaned, vacuuming the substrate (open areas) at each W/C, and live plants especially fast growing (floating plants are ideal for this). What is the normal low nitrate readng, and what is the highest?
Edit. As I was typing, the last post with ammonia showing 0 appeared, and this info further leads me to think it is the GH/pH primarily, and the nitrates not helping. All of these slowly weaken the fish so it has more and more difficulty maintaining its basic internal life essential functions.