Agree.
If there is a hidden compartment under the rug in a room. I would assign a high DC to finding it via a curosry search, say 18. If the PC says they are searching the room, quickly, I apply a penalty, if they are taking their time, i leave the DC. If they specifically say they are moving the rug, looking under the bed, its an automatic success for finding traps/hidden things.
The PC told me what he was doing, the dice do not need to be involved, it doesnt further the story or serve a purpose.
Although you are not using passive perception here.
Slightly off tangent, but I have read here on the boards about a lot of DMs who do not want there to be a secret door (or a hidden compartment under the rug) unless the players find them. They think that in order for the DM to spend the time crafting elements of his game world, he wants the players to find those elements. What good is creating entire rooms of places to adventure under the rug if the players never find it? Granted, there is a difference between small compartment with maybe a few items in it and an entire level of dungeon, but the point remains.
Personally, I think that the passive perception mechanic has some inherent flaws that a DM might want to consider not just using the same mechanic each time. Using group stealth for PCs trying to ambush vs. passive perception seems to work ok, but using it for ambushing NPCs is problematic. There are minor bugs with using (active or passive) perception (being opposed by a random DC, or a static DC) like:
1) The same PC is always the one to notice things (in the case of ambush by NPCs, the same PCs are rarely surprised because of high passive perception, the same PCs are often surprised, there is never a case of the high perception PC being surprised and the low perception PC not being surprised).
2) If the DM uses static DCs for hidden things, either the PCs always find something, or never find it (shy of the DM changing the DC as per your example).
3) Using active perception means that the math will result in PCs almost always finding something (unless the DM sets the DC extremely high).
4) Using active perception means that players will change their behavior because they know that the DM called for a perception check.
I just find both active and passive perception to be a wonky tools at times.
I don't have a good solution, but I often try to resolve these types of issues by having the "closest PCs" or the "trained PCs" or some other criteria with an active roll where not everyone in the party is rolling. Either that, or I set the DC quite a bit higher and have everyone roll. If I have a secret door, the PCs do not have to find it in my game.
And as you say, changing the DC for when PCs are actively searching as opposed to passively looking seems to be a useful compromise as well.
But one of the only times I use passive perception tends to be for monsters when the PCs are trying to use group stealth to ambush them. It's just too wonky of a tool to use all of the time as per the OP's concerns.