I confirm there is weird behavior between the rendering of
package test2 <<stereo1>> {}

and
package test2 <<stereo1>> {
}

@startuml
<style>
arrow {
FontColor: black;
LineColor: red;
LineThickness: 3;
}
.stereo1 {
BackgroundColor: aqua;
FontColor: green;
FontSize: 14;
FontStyle: Bold;
LineColor: black;
LineThickness: 3;
RoundCorner: 0;
Shadowing: 0;
}
.stereo2 {
BackgroundColor: PaleGreen;
FontColor: Blue;
FontSize: 14;
FontStyle: Bold;
LineColor: Blue;
LineThickness: 3;
RoundCorner: 0;
Shadowing: 0;
}
.stereo3 {
BackgroundColor: pink;
FontColor: black;
FontSize: 14;
FontStyle: Bold;
LineColor: black;
LineThickness: 3;
RoundCorner: 0;
Shadowing: 0;
}
</style>
hide stereotype
hide package stereotype
package test1 <<stereo1>> {
}
package test2 <<stereo2>> {
}
@enduml