Unity 6 - Screen freezes and pixel artifacting after play video

Hello, I am having issues with my application made in Unity 6000.0.24f and URP on Android devices, especially on devices like the Pixel 7.

The problem I am facing occurs when I have a video playing, and after activating and deactivating the video twice, on the second attempt, the screen either freezes or displays pixel artifacting as shown in the screenshot.

I am attaching some logs:

01-03 17:58:53.339 I/CCodecConfig(17076): query failed after returning 20 values (BAD_INDEX)
01-03 17:58:53.343 W/Codec2Client(17076): query -- param skipped: index = 1342179345
01-03 17:58:53.343 W/Codec2Client(17076): query -- param skipped: index = 2415921170
01-03 17:58:53.343 W/Codec2Client(17076): query -- param skipped: index = 1610614798
01-03 17:58:53.343 D/CCodecBufferChannel(17076): [c2.android.aac.decoder#222] Created input block pool with allocatorID 16 => poolID 27 - OK (0)
01-03 17:58:53.344 I/CCodecBufferChannel(17076): [c2.android.aac.decoder#222] Created output block pool with allocatorID 16 => poolID 46 - OK
01-03 17:58:53.344 D/CCodecBufferChannel(17076): [c2.android.aac.decoder#222] Configured output block pool ids 46 => OK
01-03 17:58:53.381 D/CCodecConfig(17076): c2 config diff is:
01-03 17:58:53.381 D/CCodecConfig(17076):   c2::u32 raw.crop.height = 1080
01-03 17:58:53.381 D/CCodecConfig(17076):   c2::u32 raw.crop.left = 0
01-03 17:58:53.381 D/CCodecConfig(17076):   c2::u32 raw.crop.top = 0
01-03 17:58:53.381 D/CCodecConfig(17076):   c2::u32 raw.crop.width = 1080
01-03 17:58:53.381 D/CCodecConfig(17076):   c2::u32 raw.max-size.height = 1088
01-03 17:58:53.381 D/CCodecConfig(17076):   c2::u32 raw.max-size.width = 1088
01-03 17:58:53.381 D/CCodecConfig(17076):   c2::u32 raw.size.height = 1088
01-03 17:58:53.381 D/CCodecConfig(17076):   c2::u32 raw.size.width = 1088
01-03 17:58:53.381 D/CCodecBuffers(17076): [c2.exynos.h264.decoder#805:2D-Output] popFromStashAndRegister: at 0us, output format changed to AMessage(what = 0x00000000) = {
01-03 17:58:53.381 D/CCodecBuffers(17076):   int32_t android._color-format = 2130708361
01-03 17:58:53.381 D/CCodecBuffers(17076):   int32_t android._video-scaling = 1
01-03 17:58:53.381 D/CCodecBuffers(17076):   int32_t rotation-degrees = 0
01-03 17:58:53.381 D/CCodecBuffers(17076):   int32_t color-standard = 1
01-03 17:58:53.381 D/CCodecBuffers(17076):   int32_t color-range = 2
01-03 17:58:53.381 D/CCodecBuffers(17076):   int32_t color-transfer = 3
01-03 17:58:53.381 D/CCodecBuffers(17076):   float cta861.max-cll = 0.0000000
01-03 17:58:53.381 D/CCodecBuffers(17076):   float cta861.max-fall = 0.0000000
01-03 17:58:53.381 D/CCodecBuffers(17076):   int32_t sar-height = 1
01-03 17:58:53.381 D/CCodecBuffers(17076):   int32_t sar-width = 1
01-03 17:58:53.381 D/CCodecBuffers(17076):   Rect crop(0, 0, 1079, 1079)
01-03 17:58:53.381 D/CCodecBuffers(17076):   int32_t width = 1088
01-03 17:58:53.381 D/CCodecBuffers(17076):   int32_t height = 1088
01-03 17:58:53.381 D/CCodecBuffers(17076):   int32_t max-height = 1088
01-03 17:58:53.381 D/CCodecBuffers(17076):   int32_t max-width = 1088
01-03 17:58:53.381 D/CCodecBuffers(17076):   string mime = "video/raw"
01-03 17:58:53.381 D/CCodecBuffers(17076):   int32_t priority = 0
01-03 17:58:53.381 D/CCodecBuffers(17076):   int32_t android._dataspace = 2600
01-03 17:58:53.381 D/CCodecBuffers(17076):   int32_t color-format = 2130708361
01-03 17:58:53.381 D/CCodecBuffers(17076): }
01-03 17:58:53.382 D/CCodecConfig(17076): c2 config diff is:
01-03 17:58:53.382 D/CCodecConfig(17076):   c2::u32 raw.channel-mask.value = 120
01-03 17:58:53.382 D/CCodecBuffers(17076): [c2.android.aac.decoder#222:Output[N]] popFromStashAndRegister: at 0us, output format changed to AMessage(what = 0x00000000) = {
01-03 17:58:53.382 D/CCodecBuffers(17076):   int32_t aac-drc-album-mode = 0
01-03 17:58:53.382 D/CCodecBuffers(17076):   int32_t aac-drc-boost-level = 127
01-03 17:58:53.382 D/CCodecBuffers(17076):   int32_t aac-drc-cut-level = 127
01-03 17:58:53.382 D/CCodecBuffers(17076):   int32_t aac-drc-effect-type = 3
01-03 17:58:53.382 D/CCodecBuffers(17076):   int32_t aac-drc-output-loudness = -10
01-03 17:58:53.382 D/CCodecBuffers(17076):   int32_t aac-encoded-target-level = -10
01-03 17:58:53.382 D/CCodecBuffers(17076):   int32_t aac-max-output-channel_count = 8
01-03 17:58:53.382 D/CCodecBuffers(17076):   int32_t aac-target-ref-level = 640
01-03 17:58:53.382 D/CCodecBuffers(17076):   int32_t channel-count = 2
01-03 17:58:53.382 D/CCodecBuffers(17076):   int32_t channel-mask = 120
01-03 17:58:53.382 D/CCodecBuffers(17076):   int32_t max-output-channel-count = 80
01-03 17:58:53.382 D/CCodecBuffers(17076):   string mime = "audio/raw"
01-03 17:58:53.382 D/CCodecBuffers(17076):   int32_t sample-rate = 44100
01-03 17:58:53.382 D/CCodecBuffers(17076):   int32_t android._config-pcm-encoding = 2
01-03 17:58:53.382 D/CCodecBuffers(17076): }
01-03 17:58:53.416 W/Thread-12(17076): type=1400 audit(0.0:240422): avc: denied { getattr } for name="/" dev="dmabuf" ino=1 scontext=u:r:untrusted_app:s0:c93,c258,c512,c768 tcontext=u:object_r:unlabeled:s0 tclass=filesystem permissive=0
01-03 17:58:53.460 W/Thread-12(17076): type=1400 audit(0.0:240423): avc: denied { getattr } for name="/" dev="dmabuf" ino=1 scontext=u:r:untrusted_app:s0:c93,c258,c512,c768 tcontext=u:object_r:unlabeled:s0 tclass=filesystem permissive=0
01-03 17:58:53.504 W/Thread-12(17076): type=1400 audit(0.0:240424): avc: denied { getattr } for name="/" dev="dmabuf" ino=1 scontext=u:r:untrusted_app:s0:c93,c258,c512,c768 tcontext=u:object_r:unlabeled:s0 tclass=filesystem permissive=0
01-03 17:58:53.552 W/Thread-12(17076): type=1400 audit(0.0:240425): avc: denied { getattr } for name="/" dev="dmabuf" ino=1 scontext=u:r:untrusted_app:s0:c93,c258,c512,c768 tcontext=u:object_r:unlabeled:s0 tclass=filesystem permissive=0
01-03 17:58:53.572 W/Thread-12(17076): type=1400 audit(0.0:240426): avc: denied { getattr } for name="/" dev="dmabuf" ino=1 scontext=u:r:untrusted_app:s0:c93,c258,c512,c768 tcontext=u:object_r:unlabeled:s0 tclass=filesystem permissive=0
01-03 17:58:54.336 D/TrafficStats(17076): tagSocket(177) with statsTag=0xffffffff, statsUid=-101
01-03 17:58:54.556 D/CCodecBufferChannel(17076): [c2.android.aac.decoder#222] MediaCodec discarded an unknown buffer
01-03 17:58:54.556 D/CCodecBufferChannel(17076): [c2.android.aac.decoder#222] MediaCodec discarded an unknown buffer
01-03 17:58:54.556 D/CCodecBufferChannel(17076): [c2.android.aac.decoder#222] MediaCodec discarded an unknown buffer
01-03 17:58:54.556 D/CCodecBufferChannel(17076): [c2.android.aac.decoder#222] MediaCodec discarded an unknown buffer
01-03 17:58:54.558 I/hw-BpHwBinder(17076): onLastStrongRef automatically unlinking death recipients
01-03 17:58:54.560 D/CCodecBufferChannel(17076): [c2.exynos.h264.decoder#805] MediaCodec discarded an unknown buffer
01-03 17:58:54.560 D/CCodecBufferChannel(17076): [c2.exynos.h264.decoder#805] MediaCodec discarded an unknown buffer
01-03 17:58:54.560 D/CCodecBufferChannel(17076): [c2.exynos.h264.decoder#805] MediaCodec discarded an unknown buffer
01-03 17:58:54.560 D/PipelineWatcher(17076): onInputBufferReleased: frameIndex not found (44); ignored
01-03 17:58:54.560 D/CCodecBufferChannel(17076): [c2.exynos.h264.decoder#805] MediaCodec discarded an unknown buffer
01-03 17:58:54.560 D/CCodecBufferChannel(17076): [c2.exynos.h264.decoder#805] MediaCodec discarded an unknown buffer
01-03 17:58:54.560 D/CCodecBufferChannel(17076): [c2.exynos.h264.decoder#805] MediaCodec discarded an unknown buffer
01-03 17:58:54.560 D/CCodecBufferChannel(17076): [c2.exynos.h264.decoder#805] MediaCodec discarded an unknown buffer
01-03 17:58:54.560 D/CCodecBufferChannel(17076): [c2.exynos.h264.decoder#805] MediaCodec discarded an unknown buffer
01-03 17:58:54.560 D/CCodecBufferChannel(17076): [c2.exynos.h264.decoder#805] MediaCodec discarded an unknown buffer
01-03 17:58:54.560 D/CCodecBufferChannel(17076): [c2.exynos.h264.decoder#805] MediaCodec discarded an unknown buffer
01-03 17:58:54.560 D/CCodecBufferChannel(17076): [c2.exynos.h264.decoder#805] MediaCodec discarded an unknown buffer
01-03 17:58:54.560 D/CCodecBufferChannel(17076): [c2.exynos.h264.decoder#805] MediaCodec discarded an unknown buffer
01-03 17:58:54.560 D/CCodecBufferChannel(17076): [c2.exynos.h264.decoder#805] MediaCodec discarded an unknown buffer
01-03 17:58:54.560 D/CCodecBufferChannel(17076): [c2.exynos.h264.decoder#805] MediaCodec discarded an unknown buffer
01-03 17:58:54.564 D/SurfaceUtils(17076): disconnecting from surface 0xb400007541d64a30, reason disconnectFromSurface

Something that caught my attention was:

01-03 17:58:54.560 D/CCodecBufferChannel(17076): [c2.exynos.h264.decoder#805] MediaCodec discarded an unknown buffer
01-03 17:58:54.564 D/SurfaceUtils(17076): disconnecting from surface 0xb400007541d64a30, reason disconnectFromSurface

After the message of disconnecting from the surface the screen just freezes or have pixel glitch.

This only happens when a video is diplayed otherwise the application works fine.

Any ideas how can i solve this?

All this happend after upgrading to Unity 6 and URP.

Thank you.