I have read that only a paint or varnish layer will do the trick, but I'm wondering if there's any oil-based penetrating sealant for cedar that has some ingredient carpenter bees find noxious, so I can discourage them from chewing up my siding and trim. Last summer was really bad, and today they're back.
I too have had this problem... adding a lavender bush next to house with pine siding is asking for trouble.
But to answer your question, yes and no. Regarding noxious, the solvents (in the varnish) will repell the bees for a short while (the first year perhaps). But to be sure, it won't keep the bees out indefinitely. edit- I think that you would have to deep seal it with shellac, then perhaps epoxy over that, which should pretty much blow your budget. Borates are the most common wood treatment (before you varnish). You can also use carbaryl (sevin) for short term fix (every summer) after you varnish.