I had problems with chili rasboras that were swimming frantically in one corner of the tank, despite the tank being fairly heavily planted.
I tried all sorts of things - reducing lighting, reducing filter flow, changing from a lily pipe to a spray bar, and even made some 'decoy' fish out of neoprene rubber and suspended them in the tank. I also dramatically increased the population of chilies, from 7 up to 19. The change to a spray bar helped a little bit, but nothing else did.
Then I gradually started allowing the hornwort in the tank to grow unchecked until the tank was fairly choked with a thicket of it. At last, the chilies calmed down and started swimming slowly and calmly in the middle of the tank. Removing the hornwort sent them straight back into panic mode. It was as if they were afraid of the open surface.
I allowed them a week or so of chilling out underneath the overgrown hornwort, now with the lights on 100% brightness to compensate for the reduced light on the carpet plants. The bright light didn't seem to matter, provided there was surface cover.
The good news is that after a week or so like this, I started gradually thinning out the hornwort, little by little. If I removed too much they would become slightly perturbed and sometimes I had to throw a bit of hornwort back in. I kept the spare hornwort in a bucket, and I'm now keeping it in a large vase on the windowsill in case I need it again.
Last night I removed pretty much the last few sprigs of hornwort, and now you can see what the tank is meant to look like. The chilies are still calm, despite the fact that there is now loads of open surface and the lights are fairly bright (running at 70% on the LED controller, giving about 1400 lumens over a 25 litre tank).
Not only are the chilies calm, but throughout this period of acclimatisation they have dramatically coloured-up. Previously they were very pale - almost colourless. But now they strut around showing off their smart red suits, and the males occasionally square up to each other. There are now 14 of them in the tank, so I think I lost 5, possibly to stress while they were so unhappy. But I've been able to count 14 for several weeks now, so I think the population is stable. They do slightly retreat into a corner whenever I do some major plant pruning, but it doesn't take long for them to come back out again if I temporarily turn the lights down.
So I do recommend getting hold of a large quantity of hornwort - enough to make a thicket over the whole tank surface, and let it grow until it forms a raft at least 2 or 3 inches deep from the surface. You could try other floaters, but perhaps the 'tangled' nature of the hornwort is important? The other advantage of hornwort is that it doesn't block the light completely. You'll be able to get rid of it gradually once your fish have chilled out for a week or so.