You can share the screen of the Macbook Pro so that it appears as a window within the iMac display (the resolution will be the same but of course the dimensions are smaller).
On the Macbook Pro, so to system Preferences/Sharing and set jup:
On the iMac: in the Finder, menu Go/Connect to Server. In the pane which opens click 'Browse'. The the next pane you should see your Macbook Pro in the list. Double-click it and click the 'Share Screen' button which will appear at top right. You will be asked to sign in with the Macbok Pro's Admin password. Its screen will open as a window which you can move and shrink but not expand. As long as the cursor is within the window you can use the pointing device and the keyboard to control the Macbook Pro. (You cannot transfer files this way but you can use file sharing to do so - click 'Connect As' insted of 'Share Screen'. Choose 'Registered user' and sign in.)
At the top of the screen is small icon to the left of the name of the computer. Drag it to the Desktop to produce an alias which you can place anywhere and double-click to open the screen sharing again.
This info is from Catalina so there may be differences with later systems.