Hello,
on the wiki of command https://community.bistudio.com/wiki/setViewDistance
it's written : "Client-side max view distance is limited by the server's view distance."
But if you join a server, opens debug console and execute :
setViewDistance 99999999;
it will set the view distance the maximum scripted (40.000)
even if in the server difficlty settings you have put for example
viewDistance=4500; preferredObjectViewDistance=4500;