2018 MBP problem with target display mode on 2011 iMac
System info:
MacBook Pro (15-inch, 2018), 2.2 GHz Intel Core i7, 32 GB RAM, Mac OS 10.13.6
iMac (27-inch, Mid 2011), 2.7 GHz Intel Core i5, 16 GB RAM, Mac OS 10.13.6
Connection between systems:
Apple Thunderbolt 1m cable or 2m cable
Apple Thunderbolt 3 (USB-C) to Thunderbolt 2 adapter. This is plugged directly in to the MBP, which has no other peripherals plugged in.
Objective: Use the iMac in target display mode as an external monitor for the MBP.
(For background, my 2014 retina MBP, using the same cable, is able to use this iMac in target display mode just fine. So the iMac and the cable work for this purpose.)
I connect the cable to the iMac and to the adapter, which I plug in to the 2018 MBP. I press cmd-F2 on the iMac, which then enables target display mode. The screen changes to display the laptop's desktop, but then the screen flashes off and on, like it is hunting for the right resolution or it is struggling to detect the display.
Here's a short silent video of it happening: https://gfycat.com/gifs/detail/GloriousClutteredAntelope
According to https://support.apple.com/en-us/HT204592, this combination should work.
The cables and adapter are all Apple parts, so there is no third-party hardware involved here whatsoever.
I've tried both cables in all four ports on the laptop, and both ports on the iMac. I've tried it with the power cord removed from the laptop, and with it connected via a three-pronged power supply extension cord (from an older laptop) to the same UPS that powers the iMac. That should eliminate a grounding issue or something weird like that.
I've also reset the SMC on the MBP, since https://support.apple.com/en-us/HT201295 mentions it can fix some target display mode issues. That didn't fix it though.
Does anyone have any ideas or experience with a setup like this? I really want to use the iMac as an external monitor for this laptop, like I had been doing with the 2014 MBP.
MacBook Pro (15-inch, 2018), macOS High Sierra (10.13.6)