Only an html5 parser will grok svg properly. bs4 allows different parsers to work including gumbo, html, lxml, and html5lib. So have you tried using either the gumbo or html5lib parsers with bs4 (both are html5 parsers)?
Gumbo uses a lookup table to fix svg attribute names and html5lib uses a simple dictionary to fix the strange case issues with svg attributes.
See here for the html5lib version (and search for viewbox)
https://github.com/html5lib/html5lib...b/constants.py
At worst case you can post process the source to fix the bad all lowercase attributes.