I'm no expert on Firefox processes (understatement) but have you identified what that FF process actually is?
Currently on my system the three FF.exe processes shown are the main browser, the user settings/preferences (presumably the profile info) and, in my case (with a private window open) a private window.
The process you can't end looks like, from its size, that it is the main browser .exe but it might not be so if you can identify exactly what it is it might help someone else here identify the problem.
Serious problems with FF, including not shutting down, are sometimes blamed on the user profile corrupting ie. it is trying to load the profile before it shuts down but can't so gets stuck in a loop. That's the theory I've read - no idea if there is any truth in it.
But it might be worth considering a FF Reset if not already tried. That should return the installation to default factory state and a new profile created. Under the FF Help tab you'll find the option in Troubleshooting information.
I can't advise whether this is a sensible thing to try, it could mean a lot of work to get FF to be re-customised back to how it was before and it might not even work. But if I had a FF installation not functioning properly and other saying that there is no problem with up to date AVAST + up to date FF then I'd be looking at it as more likely a FF issue rather than another program provoking it.