System freezing when connecting USB wifi antenna

I have a Rockpi4 running Ubuntu 18. When I connect my USB Wifi antenna (Ralink), the system freezes as soon as I execute commands (like lsusb or ifconfig) that try to access the corresponding module.
dmesg shows the following messages:

Internal error: Oops: 96000005 [#1] SMP
Modules linked in: rt2800usb(+) rt2800lib rt2x00lib
[…]

Any idea on how to fix this issue?

The device may be malfunctioning; this can crash the driver which takes the kernel with it. Do you have another device or computer you can use to verify the dongle isn’t bad?

I tried the dongle on a Windows 10 laptop and it works.

Then there may be a bug in the driver. You’ll have to bring it up with whoever is responsible for the image you installed from.