NoReverseMatch error with slug conflict

I have two apps:
For ecommerce category post slug url:
ecommerce and blog. Ecommerce and blog posts slug structure is as following :

app_name = ‘ecommerce’
app_name = ‘blog’

path('category/<str:category_slug>/', views.item_by_category, name='item_by_category'),

And for blog post category url slug:

path('categories/<str:categories_slug>/', views.post_by_category, name='post_by_category'),

When I include blog post in same page having ecommerce category slug url, it throws NoReverseMatch error

{% url 'ecommerce:item_by_category' category.slug|slugify %}

If I do not add blog post category slug and ecommerce category slug on same page both works but when I add both at same page it throws error.

What could be the issue? And how can I resolve this?

Please post the template that is throwing the error along with the complete error message being generated.