Yes, that is part of the new iPhone Mirroring function in macOS. If your phone is nearby your Mac, and something happens on the iPhone that you could deal with while sitting at your Mac, you just click on the new iPhone Mirroring icon in the doc. But the phone has to be locked. If it is in use when you try that, you get the warning that you saw.
Dave