I have had this problem also. First bring the bike to dealer and have them update your firmware. Check the position of the speed sensor and adjust till you find a sweet spot.
The power cutting occurs when in highest level of assist. If you are pedaling easyly, the cutting out of power will...