How to create a short circuit
It shouldn't be necessary to play funny games with resistors and diodes.  Lighting LEDs with a microprocessor output is a normal thing to do, and shouldn't require any kind of overly clever circuitry.

Make sure you are setting the common to high, and not simply &quot;high impedance.&quot;  You want it driven to a high state, not simply floating.  You want to use &quot;push-pull&quot; outputs, not &quot;open-drain.&quot;
Make sure you aren't switching on a pull down on the common.  All GPIO pins can have independently set pull up or pull down resistors.  These are internal to the chip and can be turned on and off through software.

From the datasheet:

Each of the GPIO pins can be configured by software as output (push-pull or open-drain), as input (with or without pull-up or pull-down) or as peripheral alternate function. Most of the GPIO pins are shared with digital or analog alternate functions. Fast I/O toggling can be achieved thanks to their mapping on the AHB2 bus. The I/Os alternate function configuration can be locked if needed following a specific
sequence in order to avoid spurious writing to the I/Os registers.

From the GPIO application notes:

STM32•GPIO exhibits the following features:
Output states: push-pull, or open drain + pull-up / pull-down according to
GPIOx_MODER, GPIOx_OTYPER, and GPIOx_PUPDR registers settings

It is entirely possible that you have your output set to open-drain with a pull down.  That would let current flow through the common pin even when it is supposedly set to &quot;high.&quot;
Another problem you have is that the common is only allowed to sink 20mA.  If you have 8 GPIOs driving 8 LEDs at 3mA, then you've exceeded the maximum allowed current of the GPIO pin you are using as common.
Even if you fix the problem of &quot;ghost lighting,&quot; you are still in danger of killing your processor.
The GPIO application notes give the following example for driving high currents from your processor:

It doesn't matter that the example shows the LED powered from 5V.  It's the same concept regardless of the supply voltage.  It'll work the same with 3.3V.
Conclusion:

Use an external transistor to drive the common.
Use current limiting for the LED segments.


To limit the LED current through the LEDs:
You processor is allowed a maximum of 8mA per pin when sourcing current, up to a total of 150mA.
8 LEDs at 20mA would exceed that maximum rating.
Your LEDs have a forward voltage of about 1.7V, and you are using them with a 3.3V powered microprocessor.  You need to limit the current to less than 18mA per LED.  Given a voltage drop of 1.6V, that's a resistor of at least 90 ohms.  Your 130 ohms was probably a good start, but 220 is probably better.
You must use a resistor for each LED segment, not one per common.