Because you use graph objects , not Plotly Express, you can add your shape use marker_pattern_shape instead of pattern_shape.
The available shape is one of [“”,“/”, “'”, “x”, “-”, “|”, “+”, “.”].
for example.
marker_pattern_shape="+"
At the bottom line you need to put
# Change the bar mode
fig.update_layout(barmode='stack')
Thanks for your answer. I am trying to assign pattern to the bar graph based on the value of a column. For example, if that column has a ‘No’ value, we assign a pattern to that bar graph. You can do that in plotly express but I think its not supported in graph objects.