This is why I never fly at home. You never know if a neighbor will cause trouble, and you typically won't know who it is. I also don't want to make enemies with neighbors. It's always best to fly where you truly thinks it's legal to fly, outside your neighborhood.
In a case like this, it's easier to simply lie to the cop if he didn't see you flying. NEVER ADMIT to flying drones to a LEO if he didn't see you himself. Even if he sees your drone stuff after you have flown, you can say "I was getting ready to fly, I've seen others fly here, is that OK?" If he says no, then just apologize and leave.
In this case you could have said, oh yeah, my friend came by to show me his drone and flew it a little bit. He just left. Did he do something wrong? The cop can't force you to disclose any names of others. Or just deny knowing his last name. It ends there. Easier to lie about it, and you've learned a lesson of where not to fly.
Anytime I'm flying, I try to fly as stealth as best possible, mitigating the possibility of someone calling a LEO. This means I use a launch site where few can see me launch or navigate. My backpack allows me to easily hike to such places and fly with privacy. This also mitigates people from asking all those questions (how far, how long, etc). Sometimes I'll have to wait for the right time to launch, with the fewest people walking by. And after takeoff, I try to remain hard to see me, navigating with the remote for the duration of the flight, while staying somewhat hidden out of sight. I've been know to hide in bushes, for the shade and stealth benefits. Yes, sometimes this means flying FPV, practically the whole time.
Sometimes I'll elect to launch and navigate from INSIDE my car. I'll prepare the drone inside the car first, then quickly place the drone a few feet in front of the car and turn it on. Then I get back inside the car and wait for the right time to take off, with the least people nearby. This only recommended with Lightbridge/OcuSync equipped drones. I can usually fly up to a mile away from inside the car. If by chance a LEO shows up and starts looking around, I'll park the drone in the sky 300' high near the sun where most difficult to see, then drive my car blocks away to retrieve the drone (I've only had to do that once). If you ever have to do that, point the camera at the COP car so you can see if he leaves, or where he goes, after you drive away. Also, even when you don't suspect a LEO is in the area when landing in a busy area, look around your area with your drone camera for COP cars. You can see much better from up high than from inside your car. It's best to avoid versus confront.