I thought LED filament lamps have a similar driver to LED nightlight such as my Eurolux one: https://www.lighting-gallery.net/gallery/displayimage.php?pos=-132879
They can not. There is very little space, what means you have to cram all into about 1/2 of the cap plus you have to manage the heat from the losses as well.
Tradditional supply schemes:
So the lower wattages and mainly the small base (E12 or E14) use just the btidge and the CCR. This design can not exceed 4W, because the ballast efficiency is barely 70%. It is a compromise between sufficient phase angle (when too low, it becomes too sensitive to the supply, leading to the need of too big design margins for the overall heat dissipation) and too high ballast losses. Practically the zLED string voltage should about equal the nominal AC supply rms voltage.
If you need to go to 8W, you may use filter capacitor, which allowas to boose the LED string voltage to go as high as 1.25x the nominal AC supply (the peak voltage of the minimum supply minus capacitor voltage ripple). That brings the losses to about 15%, but requires the tank capacitor. But the consequence is the power factor barely reaching 0.4.
If you equip the CCR with an average current control shaping the current waveform to minimize tge losses, you may go back to the first scheme(no capacitor) but the CCR needs rather smart control: It has to draw higher current when there is low voltage drop, plus reduce that when the voltage drop increases. This forms rather complex current shape, which the controller should continuously readjust to maintain the average LED current. And this needs quite tricky feedback: It should provide sufficient inertia to not alter the scaling during the evolution of the mains waveform.
Plus it should respond fast to the mains waveform changes.
And it is supposed to settle fast to prevent turn on overshoot (bright flash).
Plus it should have good dynamic stability margin, so it wont oscillate much during settling.
If you look into any feedbeck system theory, these requirements go directly against each other, so you have to design some compromise.
That means slack in some of the requirement and fit the dynamic response within. But that means the system becomes sensitive to component tolerances, plus usually the stability is designed on the edge. That means with some component toleramnces, any transient triggers some ringing of the feedback loop, which then demonstrate itself as some flicker after that transient. And the power ON or brief power interruption is a heck of transient.
You may relieve some dynamic requirements, if you equip the controller with feed forward compensations, which then prevent the transients to disturb the feedback operating point. But that requires a DSP control. That is of no problem, today that is barely 1mm^2 of silicon plus two resistors for an input voltage sensing divider, all costing less than a cent.
These then allow to implemen very complex schemes, allowing tricks to e.g. separate the scaling variation during the waveform from the loop compensation (just updates the scaling once per mains period or so), use different setting for the initial power up than for the steady glow and so on. On the other hand it becomes quite complex, so prone to design bugs and errors in judgement when designing the control scheme (it is very close to programming of a computer). Then some specific events, not fully verified during prototypes, may lead to strange response.
Or e.g. the runup settling may be designed extremelly aggressive on settling time, but causing the flicker in the process and that flicker is then judged as acceptible during development, but may then become disturbing for some uses.
But the benefit is, it reaches the 90% efficiency without or with just a small capacitor (so very small form factor), allowing this to be used above 10W.