Hello, I hope the following is of assistance.
The most likely cause of the fault you describe is a fuel pressure concern in the high pressure system. The cause of this can be anything from a blocked pipe/filter, an air leak or a failing fuel pump or injector.
It's a good idea to replace the filter but ideally when you changed it you should have checked the fuel quality in the filter, this can help to identify the fault.
If possible run some fuel from the fuel return pipe into a clean jar and allow it to settle, if after settling there are signs of metallic swarf then this would point towards a fuel pump failing.
The only way to test the fuel system is by measuring the fuel pressure while also measuring the amount of fuel returned from the injectors, the fuel pressure needs to be measured electronically due to the extreme pressures involved, at idle the pressure is between 250 to 300 bar and when accelerating can reach 1500 bar.
The only certain way to confirm if it is a fuel pressure fault is to have a diagnostic scan carried out on the engine management and retrieve the stored fault codes, the usual fuel pressure codes stored are P0251 and P1211.
When you accelerate if the fuel pressure doesn't reach the demanded pressure within a specified time, or if the pressure can't be controlled the engine management detects this and switches to limited operating to try to prevent engine damage, this is when you lose power, when you turn the engine off and restart the engine management returns to normal operation until the fault is detected again.
It's very important that this is diagnosed correctly otherwise it can become very expensive if parts are replaced needlessly.
Start with confirming it is a fuel pressure concern and if so check the fuel quality, fuel pressure and injector values, once you have these results you can then proceed with the correct repair/replacement of the failed component.
Let me know if I can assist further or if you have more questions regarding this and I'll reply as soon as I'm able to.