Haskell (Lambdabot), 131131 141 bytes
Basically the brute force approach.. The idea is to generate all possible domino pieces, permute them, check if it's a valid combo and maximize the whole thing. The time complexity is ridiculous, the 4th test case already takes ~4s on my PC and on the TIO it doesn't seem to work!
import Data.List
p w=maximum[2+lengthw=2+maximum[length$takeWhile(\(x,y)->x!!1==y!!0)$zip c|p<p$tail p|p<-permutations[[a,b]|(a,b)<-(,)<$>w<*>w,a/=b,last a==b!!0],c<-[takeWhile(\(x,y)->x!!1==y!!0)$zip p$tail p]]0]]
Ungolfed
p w = maximum
[ 2 + length c | p <- permutations [ [a,b] | (a,b) <- (,)<$>w<*>w
, a /= b
, last a == head b
]
, c <- [ takeWhile (\(x,y) -> x!!1 == y!!0) $ zip p (tail p) ]
]
Edit: Changed from Lambdabot to bare Haskell but saved a few bytes by golfing it, such that it's still less than 145
bytes :)