Blocked a frame with origin “http://localhost:5173

My Frontend is running on http://localhost:5173 (vue)
My backend is running on http://localhost:8000 (laravel rest api)

Problem :-
When i add http://localhost:8000 in a iframe in my vue frontend
(basically i wanna show laravel home screen in my frontend using iframe )
But the problem is when i try to access the dom of iframe content it gives me error that Blocked a frame with origin “http://localhost:5173”
But if i add http://localhost:5173 ( frontend home screen ) it works perfectly fine
My question is how can i give access my frontend from laravel backend so i can access document in my frontend

 <iframe
                    v-if="size === 'L' && !isLoading && !error"
                    @click="handlePopup"
                    src="http://localhost:8000"
                    class="!cursor-text scroll-smooth"
                    sandbox="allow-scripts allow-forms allow-same-origin allow-pointer-lock allow-                           presentation allow-popups allow-popups-to-escape-sandbox"
                    style="border: 0; width: 100%; height: 100%"
                    :onLoad="
                        () => {
                            initializeIframe();
                        }
                    "
                    ref="iframeRef"
                    allow-same-origin
                ></iframe>