The command for getting rid of an effect is `/effect *player* clear`, so if you put a pressure plate or something on the finish line connected to a command block, the block command would be `effect @p clear`