Invalid DTS: 2816 PTS: 1280 in output stream 0:0 when using FFmpeg NVENC encoder

I use ffmpeg h264_nvenc to record Ubuntu desktop screen:

ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -video_size 1920x1080 -framerate 60 -f x11grab -probesize 42M -i :0.0 -c:v h264_nvenc -b:v 5M screen.mp4

It works fine, but prints the following warnings:

[mp4 @ 0x563a4da0f080] Invalid DTS: 3072 PTS: 1280 in output stream 0:0, replacing by guess
[mp4 @ 0x563a4da0f080] Non-monotonous DTS in output stream 0:0; previous: 3072, current: 3072; changing to 3073. This may result in incorrect timestamps in the output file.
[mp4 @ 0x563a4da0f080] Non-monotonous DTS in output stream 0:0; previous: 3073, current: 3072; changing to 3074. This may result in incorrect timestamps in the output file.
[mp4 @ 0x563a4da0f080] Non-monotonous DTS in output stream 0:0; previous: 3074, current: 3072; changing to 3075. This may result in incorrect timestamps in the output file.
[mp4 @ 0x563a4da0f080] Non-monotonous DTS in output stream 0:0; previous: 3075, current: 3072; changing to 3076. This may result in incorrect timestamps in the output file.
[mp4 @ 0x563a4da0f080] Non-monotonous DTS in output stream 0:0; previous: 3328, current: 3328; changing to 3329. This may result in incorrect timestamps in the output file.
[mp4 @ 0x563a4da0f080] Non-monotonous DTS in output stream 0:0; previous: 3329, current: 3328; changing to 3330. This may result in incorrect timestamps in the output file.
[mp4 @ 0x563a4da0f080] Non-monotonous DTS in output stream 0:0; previous: 3330, current: 3328; changing to 3331. This may result in incorrect timestamps in the output file.
[mp4 @ 0x563a4da0f080] Non-monotonous DTS in output stream 0:0; previous: 3331, current: 3328; changing to 3332. This may result in incorrect timestamps in the output file.
[mp4 @ 0x563a4da0f080] Non-monotonous DTS in output stream 0:0; previous: 3332, current: 3328; changing to 3333. This may result in incorrect timestamps in the output file.

The warnings disappear when use x264 encoder:

ffmpeg -y -video_size 1920x1080 -framerate 60 -f x11grab -probesize 42M -i :0.0 -codec:v libx264 x264.mp4

So how can I fix it when use h264_nvenc and hevc_nvenc.

Thanks!