<p>When I print with a 0.4&nbsp; mm nozzle I have no problem with stringing at all but because I need a more detailed print I must use a 0.25&nbsp;mm nozzle.</p>

<p>I use Ultimaker Cura and an Anycubic i3 Mega.</p>

<p>What i tried so far:</p>

<ul>
<li>Enable/Disable Z hop</li>
<li>Tried different retraction distance and speed.</li>
<li>Tried with lower temperature</li>
<li>Different wall thickness</li>
</ul>

<p>If you have any suggestion please let me know.</p>

First, you should change the
nozzle diameter
setting, not just the line width setting, in Cura. Both are involved in determining extrusion. Line width can be less than or greater than nozzle size, but setting it much larger or smaller is not going to work well.
I suspect your main problem, though, is print speed. The area of the 0.25 mm nozzle orifice is only 39% of the area of an 0.4 mm nozzle orifice, bounding the material extrusion rate
at best
at 39% of what you could get with the larger nozzle (in practice it will be even lower due to complex fluid dynamics, probably much lower), but at the same linear print speed with narrower lines, you'll be extruding (or trying to extrude) 62.5% as much material per unit time. Now, if that much material can't actually make it out of the nozzle, pressure builds up between the extruder gear and the nozzle, and stringing is the result.
So, try lowering the print speed.
A lot
at first. If that solves the problem, gradually increase it until you find the limit. Increasing retraction and temperature may help you push it a little further. See my question and self-answer on stringing with flexible filaments, which might give you some ideas on other things to try:
Avoiding stringing with flexible filament