How are you downloading the photos from iCloud to your computer? And how are you checking the size? Are you using the web interface at www.icloud.com? Then you have to ensure that the full version original is selected, when you click the download button.
There is tiny "v" arrow below the downloads button, that will disclose a menu, where you can select the full size originals:
Do not use shared albums to transfer the photos. The shared albums are scaling the images down to 2040 pixel at the longest edge.
My iPhone 11 Pro Max is taking the photos at 4032 Ă— 3024 pixels, and iCloud Photos is transferring them to my Mac at the full resolution. If you get smaller photos, you may be using sharing methods to transfer the photos are reducing the size for sharing.