Cosmological signatures of ultralight dark matter with an axionlike potential | Synapse