[Windows 11] AlexInvar:
Scrcpy tool doesn't respect the port selection or is otherwise bugged:

C:\adbLink2>set PATH=C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\Oculus\Support\oculus-runtime;C:\Python310\Scripts\;C:\Python310\;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Program Files (x86)\Razer Chroma SDK\bin;C:\Program Files\Razer Chroma SDK\bin;C:\Program Files (x86)\Razer\Chromtime;C:\Python310\Scripts\;C:\Python310\;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Program Files (x86)\Razer Chroma SDK\bin;C:\Program Files\Razer Chroma SDK\bin;C:\Program Files (x86)\Razer\ChromaBroadcast\bin;C:\Program Files\Razer\ChromaBroadcast\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;C:\Program Files\dotnet\;C:\Users\LNDN\AppData\Local\Microsoft\WindowsApps;C:\Users\LNDN\AppData\Local\atom\bin;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Azure Data Studio\bin;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (eLNDN)\processing-3.5.4;C:\Program Files\Git\cmd;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\DTS\Binn\;C:\apache-ant-1.10.11\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\nodejs\;C:\ProgramData\chocolatey\bin;C:\Program Files\OpenSSL\bin;C:\Program Files\Docker\Docker\resources\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Touch Portal\plugins\adb\platform-tools;C:\Program Files\CMake\bin;C:\mingw64\bin;C:\JUCE\;C:\Users\LNDN\.sdk\ASIO;C:\Users\LNDN\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\LNDN\AppData\Local\Programs\Python\Python39\;C:\Users\LNDN\AppData\Local\Microsoft\WindowsApps;C:\Users\LNDN\AppData\Local\atom\bin;C:\Program Files\Azure Data Studio\bin;C:\Program Files (eLNDN)\platform-tools;C:\Users\LNDN\appdata\local\atom\bin;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.1\bin;;C:\Users\LNDN\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\LNDN\AppData\Local\GitHubDesktop\bin;C:\Program Files\Graphviz\bin;C:\Program Files (eLNDN)\nirsoft\nircmd;C:\Program Files (eLNDN)\nirsoft\cmm;C:\Program Files (x86)\Nmap;C:\Program Files (eLNDN)\hatools;C:\Users\LNDN\AppData\Roaming\npm;C:\Users\LNDN\AppData\Local\Microsoft\WindowsApps;;C:/adbLink2/adbfiles/;C:/adbLink2/adbfiles/scrcpy/;

C:\adbLink2>scrcpy.exe -s 192.168.2.158:5555 --record=file.mp4
scrcpy 2.0 <https://github.com/Genymobile/scrcpy>
ERROR: Could not find ADB device 192.168.2.158:5555:
ERROR: (tcpip) 192.168.2.158:34381 device SM_R890
ERROR: Server connection failed
C:\adbLink2>
C:\adbLink2>
C:\adbLink2>adb devices
List of devices attached
192.168.2.158:34381 device

C:\adbLink2>scrcpy.exe
scrcpy 2.0 <https://github.com/Genymobile/scrcpy>
C:\adbLink2\adbfiles\scrcpy\scrcpy-server: 1 file pushed. 0.5 MB/s (52867 bytes in 0.103s)
[server] INFO: Device: samsung SM-R890 (Android 13)
INFO: Renderer: direct3d
INFO: Initial texture: 448x448
WARN: Killing the server...

C:\adbLink2>scrcpy.exe --record=file.mp4
scrcpy 2.0 <https://github.com/Genymobile/scrcpy>
C:\adbLink2\adbfiles\scrcpy\scrcpy-server: 1 file pushed. 0.3 MB/s (52867 bytes in 0.147s)
[server] INFO: Device: samsung SM-R890 (Android 13)
INFO: Recording started to mp4 file: file.mp4
INFO: Renderer: direct3d
INFO: Initial texture: 448x448
WARN: [FFmpeg] track 1: codec frame size is not set
INFO: Recording complete to mp4 file: file.mp4
WARN: Killing the server...

C:\adbLink2>

It does work when entering scrcpy --record=file.mp4 manually.