I would highly recommend heading into your nearest authorised repairer or Apple Store to have the AirPods assessed even if an online apple support representative has told you they are not eligible for replacement, especially if the AirPods are still under warranty.
I always find it helps to speak to someone in person and have them look at the device as it can be quite difficult to diagnose issues over the phone.
Out if interest did the representative you spoke to give you a reason as to why they are not eligible for replacement? Also are these AirPods Pro 1st or 2nd Gen?