So, I've made a Magisk patched boot image for Android P that we can flash it in fastboot bootloader.
Note: This is not Oxygen OS ROM, this is just a patched boot img for Oxygen OS to make root work. You need to unlock the bootloader before proceeding with anything.
Note 2: Please disable Magisk modules in the Magisk Manager before flashing the patched boot, because some modules might not support the latest OOS and your device will bootloop. If the modules has been updated by the devs to support the latest OOS you can install the modules after that.
Note 3: Sorry guys, I haven't tested the Android Q Developer Previews. Even though Magisk is supported on Q, please flash it at your own risk.
For older versions download from here: Google Drive
Folder updated with Stock boot images as well.
OOS 10 Open Beta 5 Patched Boot
OOS 10 Open Beta 5 Stock Boot
OOS 10.3.1 Patched Boot
OOS 10.3.1 Stock Boot
fastboot boot (patched_boot_filename_here).img or fastboot flash boot (patched_boot_filename_here).img
reboot to system (if you make another reboot the root won't stick, so continue with the following steps)
Open Magisk (in settings select beta channel) and click install and install Magisk again with Direct Install (recommended)
reboot again and the root will stick even after the reboot.
The thread I followed for the instructions is here. Thanks for @b1czu
Even easier way to root without TWRP:
1. Install OTA update (Don't reboot).
2. Open Magisk Manager, install Magisk and choose "Install to Inactive Slot (After OTA)" (Now reboot).
3. Now you are rooted without TWRP and without any boot img hassles as well.