Why are tandem breakers on shared neutral (MWBC) problematic?
A shared-neutral (two hots sharing the same neutral) is also called a multi-wire branch circuit (MWBC).
Now to go any further, first, North American power uses a slick trick.  It supplies 120V in two poles, which can be stacked to be 240V.   Read this answer for a primer on how that works.
Then, read my answer on how poles work at the panel, and what makes tandem/duplex breakers special and different from normal ones.
Neutrals don't have breakers
The current on neutral depends on good circuit design upstream of it.  Here's what I mean.
You'll agree that this is a simple arrangement, where the circuit breaker on the hot serves to protect the neutral from overload.

Okay, that makes sense.
The neutral can't carry more than the hot, because the neutral only serves the one hot.  As long as there isn't cross-hot leakage, there's no chance of overloading that neutral.
So what happens in a shared-neutral situation?

Can you spot the problem?
The neutral isn't any bigger than the hots, yet it's being asked to carry twice the load.  There is no breaker on the neutral to protect it.  So this sharing is setting the neutral on fire.
So how can this even work, then?
So you remember at the beginning and the discussion of poles and panels.
Take any two circuits.  (They can either be on the same pole, or on different poles).  We just discussed what happens if they're on the same pole.  Look what happens if they're on opposite poles.

Now that makes sense.
When the red hot draws 13A, it's drawing all of it from the black hot.  Most current goes through 1 lamp then the other, and back to the other hot.  Only 2A actually travels down the neutral back to the panel.  Neutral only carries the difference in currents.
You can try plugging in any value of amps on either leg (between 0 and 15).  In every case, the amp flow on the neutral is always less than 15.  So this configuration is safe for the neutral.
So there is method to the madness of shared-netural, and this is the method.  But it only works if the 2 circuits are on opposite poles, and in fact, there are rules that absolutely require this. Notice the way I drew the 2-pole breaker with one big fat handle.

The breaker must be 2-pole (240V).  Now using a duplex is a common and understandable mistake.
The breaker handles must shut off together with a &quot;handle tie&quot; that is factory authorized and approved.  One quickly discovers tandems don't have handle-ties which makes that mistake a lot less understandable.  That alone disqualifies them for MWBCs.

Fixing this
Panels can be a tangle. The simplest way to check for the problem is measure between the two sharing &quot;hot&quot; wires.  If you measure 240V you're OK.  If you measure 0V, you are overloading the neutral.
You can meet the law with handle-ties, but handle-ties are expensive and hard to find... don't let that turn it into &quot;putting it off til never&quot;.  2-pole breakers will also fill the bill, and those are readily available everywhere, and they assure you get 240V between them. So that is what we recommend.
Now, people normally use duplex/tandem only when their panel is full.  If you have that problem, then you need to look at quadplex breakers.   These are 2-pole breakers that either have

a) a 2-pole in the middle and two singles on the outside, or
b) a 2-pole breaker on the inside and another 2-pole breaker on the outside.

If you have 2 single circuits nearby (which aren't shared-neutral MWBC), you can use type a).  If you need to fit 2 full MWBCs into 2 spaces, use type b).  These don't exist in every type of panel.
If you cannot fit full 2-pole, and cannot find appropriate quadplex, then splice both hots to each other with a pigtail, and attach the pigtail to a plain breaker.  This will limit both half-circuits to 15A among them, but will assure the neutral isn't overloaded.  This would be a way to do it without buying any breakers:

This would also work with a GFCI or AFCI breaker instead of a duplex.
How about adding GFCI?
Shared-neutral/MWBCs have fallen out of favor because they're a pain to deal with AFCI and GFCI.
AFCI is meant to protect the branch circuit wires, so putting AFCI anywhere but the panel will provide poor protection. There are some topology tricks you can do with receptacles for GFCI.  But really, the best way to fit GFCI or AFCI to any shared-neutral MWBC is to use a 2-pole GFCI or AFCI breaker right at the panel.
However, here's the gotcha in a tight panel.  There's no such thing as a duplex ACFI or GFCI.  They take a lot of space.  A GFCI/AFCI suitable for a shared-neutral MWBC will absolutely require two full spaces.
But you can always use the &quot;pigtail both hots onto one breaker&quot; method with a plain single-pole GFCI, but obviously that will limit your usable current.