Unable To Resize Video Component Using Client.UpdateVideoOption During Screen Share And Stop In Attendee View

We are facing an issue where we are unable to resize the video component’s width and height using the client.updateVideoOption function when the host/speaker starts and stops screen sharing in the attendee view. We would appreciate your assistance in resolving this issue.
Below is the shared code of the attendee view for your reference.

client.updateVideoOptions({
  defaultViewType: "active" as SuspensionViewType,
  viewSizes: {
    default: {
      width: widthRef,
      height: 0,
    },
  },
});