BUG: agg in multindex dataframe no working when passing dictionary of strings
### 

- [X] I have checked that this issue has not already been reported.

- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.

- [x] I have confirmed this bug exists on the master branch of pandas.


### Reproducible Example

```python
import pandas as pd
df = pd.DataFrame({'foo_1': ['a', 'b', 'a', 'h', 'g'], 'foo_2': ['b', 'a', 'c', 'g', 'c'],
                   'foo_3': ['e', 'c', 'f', 'c', 'h'],'foo_4': ['f', 'e', 'b', 'a', 'c']})
cols = df.columns
foo = pd.get_dummies(df,prefix=['']*len(cols),prefix_sep='')
# This works
foo.agg({'a' : 'sum', 'b' : ['min']})
# This works
foo.agg({'a' : ['sum'], 'b' : 'min'})
# This doesn't
foo.agg({'a' : 'sum', 'b' : 'min'})

---------------------------------------------------------------------------

ValueError                                Traceback (most recent call last)

<ipython-input-5-e185a0f152e3> in <module>()
----> 1 foo.agg({'a' : 'sum', 'b' : 'min'})

16 frames

/usr/local/lib/python3.7/dist-packages/pandas/core/frame.py in aggregate(self, func, axis, *args, **kwargs)
   8549 
   8550         op = frame_apply(self, func=func, axis=axis, args=args, kwargs=kwargs)
-> 8551         result = op.agg()
   8552 
   8553         if relabeling:

/usr/local/lib/python3.7/dist-packages/pandas/core/apply.py in agg(self)
    698         result = None
    699         try:
--> 700             result = super().agg()
    701         except TypeError as err:
    702             exc = TypeError(

/usr/local/lib/python3.7/dist-packages/pandas/core/apply.py in agg(self)
    159 
    160         if is_dict_like(arg):
--> 161             return self.agg_dict_like()
    162         elif is_list_like(arg):
    163             # we require a list, but not a 'str'

/usr/local/lib/python3.7/dist-packages/pandas/core/apply.py in agg_dict_like(self)
    458             axis = 0 if isinstance(obj, ABCSeries) else 1
    459             result = concat(
--> 460                 {k: results[k] for k in keys_to_use}, axis=axis, keys=keys_to_use
    461             )
    462         elif any(is_ndframe):

/usr/local/lib/python3.7/dist-packages/pandas/util/_decorators.py in wrapper(*args, **kwargs)
    309                     stacklevel=stacklevel,
    310                 )
--> 311             return func(*args, **kwargs)
    312 
    313         return wrapper

/usr/local/lib/python3.7/dist-packages/pandas/core/reshape/concat.py in concat(objs, axis, join, ignore_index, keys, levels, names, verify_integrity, sort, copy)
    305     )
    306 
--> 307     return op.get_result()
    308 
    309 

/usr/local/lib/python3.7/dist-packages/pandas/core/reshape/concat.py in get_result(self)
    506 
    507                 index, columns = self.new_axes
--> 508                 df = cons(data, index=index, copy=self.copy)
    509                 df.columns = columns
    510                 return df.__finalize__(self, method="concat")

/usr/local/lib/python3.7/dist-packages/pandas/core/frame.py in __init__(self, data, index, columns, dtype, copy)
    612         elif isinstance(data, dict):
    613             # GH#38939 de facto copy defaults to False only in non-dict cases
--> 614             mgr = dict_to_mgr(data, index, columns, dtype=dtype, copy=copy, typ=manager)
    615         elif isinstance(data, ma.MaskedArray):
    616             import numpy.ma.mrecords as mrecords

/usr/local/lib/python3.7/dist-packages/pandas/core/internals/construction.py in dict_to_mgr(data, index, columns, dtype, typ, copy)
    463 
    464     return arrays_to_mgr(
--> 465         arrays, data_names, index, columns, dtype=dtype, typ=typ, consolidate=copy
    466     )
    467 

/usr/local/lib/python3.7/dist-packages/pandas/core/internals/construction.py in arrays_to_mgr(arrays, arr_names, index, columns, dtype, verify_integrity, typ, consolidate)
    122 
    123         # don't force copy because getting jammed in an ndarray anyway
--> 124         arrays = _homogenize(arrays, index, dtype)
    125 
    126     else:

/usr/local/lib/python3.7/dist-packages/pandas/core/internals/construction.py in _homogenize(data, index, dtype)
    569                 # Forces alignment. No need to copy data since we
    570                 # are putting it into an ndarray later
--> 571                 val = val.reindex(index, copy=False)
    572 
    573             val = val._values

/usr/local/lib/python3.7/dist-packages/pandas/core/series.py in reindex(self, index, **kwargs)
   4578     )
   4579     def reindex(self, index=None, **kwargs):
-> 4580         return super().reindex(index=index, **kwargs)
   4581 
   4582     @deprecate_nonkeyword_arguments(version=None, allowed_args=["self", "labels"])

/usr/local/lib/python3.7/dist-packages/pandas/core/generic.py in reindex(self, *args, **kwargs)
   4817         # perform the reindex on the axes
   4818         return self._reindex_axes(
-> 4819             axes, level, limit, tolerance, method, fill_value, copy
   4820         ).__finalize__(self, method="reindex")
   4821 

/usr/local/lib/python3.7/dist-packages/pandas/core/generic.py in _reindex_axes(self, axes, level, limit, tolerance, method, fill_value, copy)
   4841                 fill_value=fill_value,
   4842                 copy=copy,
-> 4843                 allow_dups=False,
   4844             )
   4845 

/usr/local/lib/python3.7/dist-packages/pandas/core/generic.py in _reindex_with_indexers(self, reindexers, fill_value, copy, allow_dups)
   4887                 fill_value=fill_value,
   4888                 allow_dups=allow_dups,
-> 4889                 copy=copy,
   4890             )
   4891             # If we've made a copy once, no need to make another one

/usr/local/lib/python3.7/dist-packages/pandas/core/internals/managers.py in reindex_indexer(self, new_axis, indexer, axis, fill_value, allow_dups, copy, consolidate, only_slice)
    668         # some axes don't allow reindexing with dups
    669         if not allow_dups:
--> 670             self.axes[axis]._validate_can_reindex(indexer)
    671 
    672         if axis >= self.ndim:

/usr/local/lib/python3.7/dist-packages/pandas/core/indexes/base.py in _validate_can_reindex(self, indexer)
   3783         # trying to reindex on an axis with duplicates
   3784         if not self._index_as_unique and len(indexer):
-> 3785             raise ValueError("cannot reindex from a duplicate axis")
   3786 
   3787     def reindex(

ValueError: cannot reindex from a duplicate axis
```


### Issue Description

The issue seems to be having multiple columns with the same name. I tested with other dataframe without multiple columns with the same name and it works fine.

Tested in colab with the latest pandas and also local with anaconda with 1.3.2

### Expected Behavior

       a              b          
       a    a    a    b    b    b
sum  2.0  1.0  1.0  NaN  NaN  NaN
min  NaN  NaN  NaN  0.0  0.0  0.0


### Installed Versions

<details>

INSTALLED VERSIONS
------------------
commit           : 73c68257545b5f8530b7044f56647bd2db92e2ba
python           : 3.7.12.final.0
python-bits      : 64
OS               : Linux
OS-release       : 5.4.104+
Version          : #1 SMP Sat Jun 5 09:50:34 PDT 2021
machine          : x86_64
processor        : x86_64
byteorder        : little
LC_ALL           : None
LANG             : en_US.UTF-8
LOCALE           : en_US.UTF-8

pandas           : 1.3.3
numpy            : 1.19.5
pytz             : 2018.9
dateutil         : 2.8.2
pip              : 21.1.3
setuptools       : 57.4.0
Cython           : 0.29.24
pytest           : 3.6.4
hypothesis       : None
sphinx           : 1.8.5
blosc            : None
feather          : 0.4.1
xlsxwriter       : None
lxml.etree       : 4.2.6
html5lib         : 1.0.1
pymysql          : None
psycopg2         : 2.7.6.1 (dt dec pq3 ext lo64)
jinja2           : 2.11.3
IPython          : 5.5.0
pandas_datareader: 0.9.0
bs4              : 4.6.3
bottleneck       : 1.3.2
fsspec           : None
fastparquet      : None
gcsfs            : None
matplotlib       : 3.2.2
numexpr          : 2.7.3
odfpy            : None
openpyxl         : 2.5.9
pandas_gbq       : 0.13.3
pyarrow          : 3.0.0
pyxlsb           : None
s3fs             : None
scipy            : 1.4.1
sqlalchemy       : 1.4.23
tables           : 3.4.4
tabulate         : 0.8.9
xarray           : 0.18.2
xlrd             : 1.1.0
xlwt             : 1.3.0
numba            : 0.51.2


</details>
