modindex_common_prefix does not work for html alone
.. confval:: modindex_common_prefix A list of prefixes that are ignored for sorting the Python module index (e.g., if this is set to ``['foo.']``, then ``foo.bar`` is shown under ``B``, not ``F``). This can be handy if you document a project that consists of a single package. Works only for the HTML builder currently. Default is ````.
I tested it with latexpdf and it worked just fine.