This is basically how I have my setup.
My UDMP port 11 set to 1GbpsFDX
USW-24-POE port 25 set to auto negotiate
I'm running this DAC cable between the two https://www.amazon.com/gp/product/B01M09C9NZ/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1
Been working fine for me since I set it up.
Look on Amazon for the 10Gtek DAC cables that specifically call out Unifi/Ubiquiti support.
That should do it I think. I currently use longer ones for my esxi hosts to a xg-16.