Generally speaking, only the British did this.
There were a couple of techniques used. The most common was to paint the 17pr barrel only to the length of a typical 75mm gun in the same green as the rest of the tank, and then finish off the rest in a disruptive scheme. The thinking being that at first glance, the long barrel would be missed. The second technique was similar but, as you mention, involved a fake muzzle brake at the 75mm mark, making a bulge in the barrel part way along, and then going disruptive beyond it. This never made sense to me, as the 75mm never had a muzzle brake, so it is unclear as to what they were trying to replicate. The third option was to install a dummy 75mm cannon on the turret rear, and drive around turret backwards, which may have been better deception, but would be decidedly unpopular given the length of time needed to get the gun into action. I can’t recall any wide scale fakery on the US 76mm. Sometimes the muzzle brake would be removed entirely, but that would be a reflection of the fact that muzzle brakes tended to throw up more dust when firing, making a bigger signature, and obscuring observation of fire. This also means that once a 17pr gun fired, the gig was up. Camo was no longer relevant, it was fairly obvious which tank it was.
Honestly, I am unconvinced of its effectiveness. The thinking was that the Germans would consider the tank to be a priority target, and would shoot the Firefly first. The problem is that just because the British thought that was what the Germans would do does not necessarily imply that the Germans agreed, and I have not seen any evidence that they either (a) thought so, or (b) tried to. It is certainly true that Fireflies had a better survival rate than 75mm tanks, and forgive me for not having the figures available (I am in Munster, Germany, visiting the Panzermuseum, so I’ll ask them), but this can be attributed to usage, not the camouflage.
The big thing is that Firefly was rarely up front to get shot at in the first place, for two or three reasons. Firstly, they were relatively rare, so commanders tended not to want to risk them. Something more... disposable could go find the enemy instead. Secondly, Firefly was actually not that great a tank compared to the 75mm ones. Given that the opposition encountered was far more likely to be soft skin, light armor, or AT guns than heavy armor, the 75mm tanks would be better at dealing with the problem. This would be a reflection on the lack of bow machinegun/gunner, power elevation, rate of fire, and a good HE round on a Firefly. Thus, the 17pr tank would be found to the rear of the column. In NW Europe that usually meant it was the last tank in a troop, and in Italy, it was not unheard of for them to be bundled together in an overwaching troop which was to the rear of the rest of the Squadron. Finally, if the turret is ‘gun forward’, it’s relatively hard to distinguish the length of the gun when it is more or less pointing in your direction. Thus it can be concluded that being to the rear was more the cause of 17pr survival than camouflage.
From the German perspective, targeting the 17pr first would only be possible in a good flanking ambush, really. Otherwise, the operational realities would be to go for the 75mm tanks first, for several reasons. Firstly, there wasn’t a hell of a lot out there that a Firefly could reliably punch through that a 75mm couldn’t. If you were in a Panzer IV or a StuG, the common AFVs, that closer 75mm gun is decidedly going to be more of a concern than that 17pr over yonder. If you were in a Panther, the thing was sufficiently well armored that even 17prs could have difficulty, so just start knocking out the easiest enemy tanks quickly if the distant one would be more difficult to hit, if you even saw it. (Remember, gunnery back then as nowhere near as quick and accurate as today). So, really, only the rare Tiger Is and maybe JPz IVs would have the armor to allow such a targeting process to prioritize 17pr. Besides, although “most dangerous target first” is a common and sensible policy, even a 75mm tank could still ruin your day in a Panther, Tiger or such, if you left it alone while you dealt with a harder to kill target, and I am sure that your accompanying infantry/AT guns etc would greatly appreciate the removal of the thing well capable of killing them effectively.
So, the bottom line is that, no, I don’t believe it was particularly useful in practice. However, unlike some other home remedies applied to tanks such as field added armor, applying paint to the second half of the gun doesn’t come with any notable drawbacks, so if the Firefly crews wanted to spend a couple of hours when they got their new tank making the gun look shorter, then why not let them? And it might, possibly, end up in one of those very rare occasions that a German did take a fraction of a moment to attempt to do a rapid target selection on the basis of gun.