I have face the same issue and easily solved when I use default function in layout E.g. admin/layout.tsx rather than const, which causing problem in rendering component.
admin/layout.tsx
const