It's not trying to stall the plane. The system does not know about you retracting the flaps and it does not need to.
Retracting flaps and accelerating always means you need to trim, with the STS you just need to trim a little bit more.
You are blaming the STS for the need to trim, but that requirement is always there.
So if you assume no flap changes (for which you will always need to trim) the system does indeed try to keep the speed stable.
Accelerating the STS will support the natural pitch up tendency of the plane and the pitch up will reduce the speed increase.
That is what speed stable is, the plane pitches up when you increase the speed.
The system is not meant to assist you trimming.
It is meant to emulate a plane with a bigger elevator in which you need to trim more for speed changes.