3 added 2 characters in body
source | link

JELLYJelly, 10 9 bytes

f⁴L
ŒgÇ€Ṁ

Explanation:

f⁴L
f⁴      -Filter by the character argument.
  L     -Return Length of filtered String.

ŒgÇ€»/
Œg      -Group string by runs of characters.
  ǀ    -Run above function on each group.
    Ṁ   -Return the largest in the list.

Try it online!

JELLY 10 9 bytes

f⁴L
ŒgÇ€Ṁ

Explanation:

f⁴L
f⁴      -Filter by the character argument.
  L     -Return Length of filtered String.

ŒgÇ€»/
Œg      -Group string by runs of characters.
  ǀ    -Run above function on each group.
    Ṁ   -Return the largest in the list.

Try it online!

Jelly, 10 9 bytes

f⁴L
ŒgÇ€Ṁ

Explanation:

f⁴L
f⁴      -Filter by the character argument.
  L     -Return Length of filtered String.

ŒgÇ€»/
Œg      -Group string by runs of characters.
  ǀ    -Run above function on each group.
    Ṁ   -Return the largest in the list.

Try it online!

2 Improved finding max, added link to try online
source | link

JELLY 1010 9 bytes

f⁴L
ŒgÇ€»/ŒgÇ€Ṁ

Explanation:

f⁴L
f⁴      -Filter by the character argument.
  L     -Return Length of filtered String.

ŒgÇ€»/
Œg      -Group string by runs of characters.
  ǀ    -Run above function on each group.
    »/  -Return the largest in the list.

Try it online!

JELLY 10 bytes

f⁴L
ŒgÇ€»/

Explanation:

f⁴L
f⁴      -Filter by the character argument.
  L     -Return Length of filtered String.

ŒgÇ€»/
Œg      -Group string by runs of characters.
  ǀ    -Run above function on each group.
    »/  -Return the largest in the list.

JELLY 10 9 bytes

f⁴L
ŒgÇ€Ṁ

Explanation:

f⁴L
f⁴      -Filter by the character argument.
  L     -Return Length of filtered String.

ŒgÇ€»/
Œg      -Group string by runs of characters.
  ǀ    -Run above function on each group.
      -Return the largest in the list.

Try it online!

1
source | link

JELLY 10 bytes

f⁴L
ŒgÇ€»/

Explanation:

f⁴L
f⁴      -Filter by the character argument.
  L     -Return Length of filtered String.

ŒgÇ€»/
Œg      -Group string by runs of characters.
  ǀ    -Run above function on each group.
    »/  -Return the largest in the list.