Restarting the PS4 usually fixes this issue, as rebooting any device fixes most issues. Do note that the bug will reappear after a while. I have this same exact issue with a controller I brought a month ago and restarting the device is the cheap way to do it. If that doesn’t work, reset the PS4 controller, which is a small button underneath the L2 button. You might need a paperclip or a mechanical pencil to press this button.