When starting my build at the beginning of a game, I got housed and tried to cancel the villager in my TC queue. I was unable to cancel the villager to start researching Loom instead while I built a house.
I read about the same issue someone else was having on a forum; they found that it only occurs when your UI scale is set to max (125%) I lowered the UI scale to 123% and was able to cancel units again.
Set UI Scale to 125% (Also occurs at 124%)
Set any unit to train or tech to research at any production/tech building.
Try to cancel the tech/unit. It won’t cancel.
Set UI Scale to 123% (or lower until it works for you)
I think this bug is also linked to screen resolution. My current screen resolution is 1600x900 and I have to reduce UI scale to 120%. When I change the resolution to 1366x768, I need to reduce UI scale to 118%.
This bug not only prevents you from cancelling units/researches but also prevents selecting individual units when you have multiple units selected from the their cards in the UI area. Same goes for deselecting individual units with Ctrl and all units of a kind with Shift.