Presumably you are trying to use the new Stage Manager feature - that effectively provides an extended desktop.
To use Stage Manager with an external monitor, you must update your iPad Pro M2 to iPadOS 16.2 or later. iPadOS 16.3 is current; if you haven’t already updated to this version, you should do so before proceeding.
With your iPad updated, enable Stage Manager:
Settings > Home Screen & Multitasking > Stage Manager > Use Manager on iPad - set to ON
At this point, you will likely see a mirrored display. You need to change a setting to use Stage Manager with your external display:
Settings > Display & Brightness
You should see two monitors listed - your iPad - and your external monitor; tap on the entry for your connected monitor. You should see something like this:
Ensure the Mirror Display is set to OFF - and tap Set.
You may also wish to enjoy the full resolution capability of your iPad Pro 12.9” display:
Settings > Display & Brightness > Display Zoom > select More Space, then Done