Given the amount of cannabis you could fit into hand luggage, and that customs is intelligence-led, I'd suggest that if that intelligence suggests a flight is more likely to have anything either illegal or beyond customs limits then hand luggage is going to be targeted for search, and likely sniffer dogs will be around.
The rules around allowable importation of even CBD oil are stringent. If you're trying to bring cannabis product back in whatever form - well, that's illegal so you should expect to face consequences if caught.