I ran the query SET NAMES 'utf8mb4' on MySQL, and it worked perfectly fine. The result was as expected. See the screenshots below.
SET NAMES 'utf8mb4'