Well, here's my take on this. The AIM in my opinion says not to squawk STBY during code changes. It does not say that directly, but by implication.
4-1-19. Transponder Operation 3. Civil and military transponders should be adjusted to the "on" or normal operating position as late as practicable prior to takeoff and to "off" or "standby" as soon as practicable after completing landing roll, unless the change to "standby" has been accomplished previously at the request of ATC. IN ALL CASES, WHILE IN CONTROLLED AIRSPACE EACH PILOT OPERATING AN AIRCRAFT EQUIPPED WITH AN OPERABLE ATC TRANSPONDER MAINTAINED IN ACCORDANCE WITH 14 CFR SECTION 91.413 SHALL OPERATE THE TRANSPONDER, INCLUDING MODE C IF INSTALLED, ON THE APPROPRIATE CODE OR AS ASSIGNED BY ATC. IN CLASS G AIRSPACE, THE TRANSPONDER SHOULD BE OPERATING WHILE AIRBORNE UNLESS OTHERWISE REQUESTED BY ATC.
and,
e. Code Changes
1. When making routine code changes, pilots should avoid inadvertent selection of Codes 7500, 7600 or 7700 thereby causing momentary false alarms at automated ground facilities. For example, when switching from Code 2700 to Code 7200, switch first to 2200 then to 7200, NOT to 7700 and then 7200. This procedure applies to nondiscrete Code 7500 and all discrete codes in the 7600 and 7700 series (i.e., 7600-7677, 7700-7777) which will trigger special indicators in automated facilities. Only nondiscrete Code 7500 will be decoded as the hijack code.
In saying to avoid inadvertent selection of certain codes and using the examples they give, it implies you're to remain "on" during code changes.
One more important fact worth mentioning. Even though you might only be in STBY for a few seconds, ATC would lose radar contact with you during that period (perhaps not a big problem, I don't know), but more importantly, you would render TCAS inoperative during this time.
gary