First of all, let's sort and clean our anchovies, strain them well, and then salt the strained anchovies and put them in the fridge to rest for 1 hour. Its flavor will increase as it absorbs the salt while waiting.
Meanwhile, let's finely chop our onions and tomatoes into rings or half moons.
First, let's arrange our first sliced onion on the bottom of our baking tray, then our anchovies, and then our second onion, and again, let's arrange our tomatoes in the shape we want.
Finally, let's pour lemon juice, olive oil, salt, black pepper and chili pepper on it and bake it in the oven, uncovered, at 200° for half an hour.
After making sure that it is cooked, let's leave only the upper part of the oven open and let the tops of our fish brown. 5-10 minutes will be enough. (it's worth checking because not every oven is the same)