Repository: flutter
Issue: Text with ShaderMask with Gradient show unexpected black decoration and transparent spaces.
Labels: engine,dependency: skia,a: typography,has reproducible steps,P2,found in release: 3.10,found in release: 3.11,team-engine,triaged-engine

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Steps to reproduce

Hi, I create a `GradientText` Widget which is a text that can have a gradient as border and other gradient as a fill, but on several occasions I can see that a black border is visible, and white space (as in the j dot), why?

I leave you a DartPad where you can reproduce it, there I exaggerated the border width so that the error can be seen well, but even if it is 1 or 2 in some words or fonts, the same thing happens

DartPad: https://dartpad.dev/?id=6cd64f9a428393d3d4f9290973e132de



### Expected results

the border should have only the colors of the gradient.

### Actual results

The border shows in addition to the gradient colors a black color and white spaces.

### Code sample

<details><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const MainApp());
}

class MainApp extends StatelessWidget {
  const MainApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: Scaffold(
        body: Center(
          child: GradientText(
            'jgoqupLy',
            fontSize: 40,
            borderWidth: 20,
            borderGradient: LinearGradient(
              colors: [
                Colors.yellow,
                Colors.green,
              ],
            ),
            fillGradient: LinearGradient(
              colors: [
                Colors.red,
                Colors.blue,
              ],
            ),
          ),
        ),
      ),
    );
  }
}

class GradientText extends StatelessWidget {
  const GradientText(
    this.data, {
    super.key,
    required this.fontSize,
    required this.borderGradient,
    required this.fillGradient,
    required this.borderWidth,
  });

  final String data;
  final Gradient borderGradient;
  final Gradient fillGradient;
  final double borderWidth;
  final double fontSize;

  @override
  Widget build(BuildContext context) {
    return Stack(
      children: [
        _buildGradientTextBase(
          gradient: borderGradient,
          paintingStyle: PaintingStyle.stroke,
        ),
        _buildGradientTextBase(
          gradient: fillGradient,
          paintingStyle: PaintingStyle.fill,
        ),
      ],
    );
  }

  Widget _buildGradientTextBase({
    required Gradient gradient,
    required PaintingStyle paintingStyle,
  }) {
    return ShaderMask(
      blendMode: BlendMode.srcIn,
      shaderCallback: (bounds) => gradient.createShader(
        Rect.fromLTWH(0, 0, bounds.width, bounds.height),
      ),
      child: Text(
        data,
        style: TextStyle(
          fontSize: fontSize,
          foreground: Paint()
            ..style = paintingStyle
            ..strokeWidth = borderWidth,
          fontWeight: FontWeight.bold,
        ),
      ),
    );
  }
}
```

</details>


### Screenshots or Video

<details>
<summary>Screenshots / Video demonstration</summary>

![image](https://github.com/flutter/flutter/assets/105388540/92e7aaff-aa07-4285-9c90-7fa65d86a380)

</details>


### Logs

<details><summary>Logs</summary>

```console

```

</details>


### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.10.0, on Microsoft Windows, locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.11.14)
[√] Android Studio (version 2020.3)
[√] VS Code (version 1.78.2)
[√] Connected device (3 available)
[√] Network resources
```

</details>