Unsure if this is the ideal solution for the issue at hand.
However, it is possible to avoid text-decoration using the text-decoration-skip property. Here are some resources that may be helpful: link1, link2. Although these did not seem suitable in this case.
I attempted to separate 'L' and the remaining content as distinct elements and apply text-decoration to them (even though I know it's not the correct approach), but it could potentially assist you.
div{
display:flex;
}
p.overline::first-line{
display:inline-block;
width:100%;
font-weight: bold;
text-decoration:overline;
}
p:first-child::first-letter {
text-decoration: none;
/*text-decoration-color: rgba(59, 119, 191, 0.68);*/
color: red;
font-weight: bold;
background-color: rgba(59, 119, 191, 0.68);
margin: 0px 2px 1px 0;
padding: 5px 13px 5px 11px;
color: #b1ffea;
}
<h2>Heading <a href="#"><span class="anchor">#</span></a></h2>
<div>
<p >L</p>
<p class="overline">orem ipsum dolor sit amet, consectetur adipisicing elit. Consequuntur eaque enim eveniet facere incidunt inventore necessitatibus non quas, repellat sed ullam unde ut vitae! Asperiores ducimus laborum magnam officia repellendus.
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis ipsum laborum sunt voluptate voluptates voluptatum. A architecto beatae delectus eos itaque magnam nostrum perferendis, provident quis quos repellendus similique vitae!
Lorem ipsum dolor sit amet, consectetur <a href="#">some link</a> adipisicing elit. Ducimus itaque numquam voluptatem. Ad aspernatur consequuntur deserunt et expedita facilis id, iste maxime minus nisi odit quaerat quisquam quod tempora velit?
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dignissimos <a href="#">another link</a> illo iure magni odio quas, sint totam ut. Aliquam ipsa recusandae voluptatem! A consectetur deserunt eos quaerat rerum. Dolores, quod voluptatem.</p>
</div>
Hoping this information proves valuable to you.