Of course they didn’t stop after the election, but Trump is specifically talking about spying during the campaign, which is before the election, so it can’t possibly be “treason”. It’s a bad choice of words.
You mean when Obama spied on Trump, before the election, thus giving aid and comfort to our enemies whose motive was to disrupt our election process?