For the purposes of this challenge a substring \$B\$ of some string \$A\$ is string such that it can be obtained by removing some number of characters (possibly zero) from the front and back of \$A\$. For example \$face\$ is a substring of \$defaced\$
\$ de\color{red}{face}d \$
This is also called a contiguous substring.
A common substring of two strings \$A\$ and \$B\$ is a third string \$C\$ such that it is a substring of both \$A\$ and \$B\$. For example \$pho\$ is a common substring of \$photochemistry\$ and \$upholstry\$.
\$ \color{red}{pho}tochemistry\\ u\color{red}{pho}lstry \$
If we have two strings \$A\$ and \$B\$ an uncommon substring of \$A\$ with respect to \$B\$ is a third string \$C\$, which is a substring of \$A\$ and has no common substring of length 2 with \$B\$.
For example the longest uncommon substring of \$photochemistry\$ with respect to \$upholstry\$ is \$otochemis\$. \$otochemis\$ is a substring of \$A\$ and the the only nonempty common substrings of \$otochemis\$ and \$upholstry\$ are size 1 (\$o\$, \$t\$, \$h\$, and \$s\$). If we added any more onto \$otochemis\$ then we would be forced to permit a common subsring of size 2.
Task
Given two strings \$A\$ and \$B\$ output the maximum size an uncommon substring of \$A\$ with respect to \$B\$ can be. You may assume the strings will only ever contain alphabetic ASCII characters. You can assume \$A\$ and \$B\$ will always be non-empty.
This is code-golf so answers will be scored in bytes with fewer bytes being better.
Test cases
photochemistry, upholstry -> 9
aaaaaaaaaaa, aa -> 1
aaaaabaaaaa, aba -> 5
babababababa, ba -> 2
barkfied, x -> 8
barkfield, k -> 9
bakrfied, xy -> 8
barkfied, k -> 8
that 1c B is ignored \$\endgroup\$