If the Sword stop give you effects gust kill more mobs or break block and you will continue getting effects sorry about the glitch.
USE OPTIFINE FOR RES PACK